A transient amount of object to exist over _maxSize until trim() is called. But any added objects over _localAbsMaxSize will be disposed immediately.
Optional
_generator: ((...args: any[]) => T)The delegate to create new items.
Rest
...args: any[]Optional
_recycler: ((o: T) => void)An optional delegate to clean/process items before returning to the pool.
The soft ceiling by which the pool is trimmed. Default is 1000.
Current number of objects in the pool.
The soft ceiling by which the pool is trimmed.
Protected
_cancelProtected
_onProtected
_recycleStatic
createCreates a pool using the specified generator and optional recycler.
Optional
generator: ((...args: any[]) => T)Rest
...args: any[]Optional
recycler: ((o: T) => void)Static
createCreates an auto-recycled pool using the specified generator.
Optional
generator: ((...args: any[]) => T)Rest
...args: any[]Generated using TypeDoc
A flexible Object Pool that trims the pool down to the specified max size after a specified delay.