Constructor
new ObjectPool(naivePool, useProcess, recycleProcess)
Parameters:
Name | Type | Description |
---|---|---|
naivePool |
The pool object with use() and recycle(obj) methods. | |
useProcess |
The callback function which will be called in use(). | |
recycleProcess |
The callback function which will be called in recycle(). |
Methods
recycleAll(array)
Recycles all elements of the provided array.
Parameters:
Name | Type | Description |
---|---|---|
array |