Class: Pool

Pool

Generic object pool for limiting memory usage

Constructor

new Pool(object)

Constructor
Parameters:
Name Type Description
object * object to alloc in the pool
Source:

Methods

alloc() → {*}

Allocate space in the pool
Source:
Returns:
Type
*

collect() → {Pool}

Collect all objects in the pool and clear current stats
Source:
Returns:
Type
Pool

free(obj) → {Pool}

Free space in the pool by returning an object to it
Parameters:
Name Type Description
obj *
Source:
Returns:
Type
Pool