AdvancedThe type of items in the pool. Must implement PoolItem.
The type of argument passed to item's init method if it exists.
Constructs a new Pool.
The type of items in the pool. Must implement PoolItem.
The type of argument passed to item's init method if it exists.
The constructor of the items in the pool.
OptionalinitialSize: numberThe initial size of the pool.
Gets the number of items in the pool that are free to use without needing to create more.
Gets the number of items in the pool.
Gets the number of items in the pool that are currently in use.
clears the pool
Prepopulates the pool with a given number of items.
The number of items to add to the pool.
Returns an item to the pool. Calls the item's reset method if it exists.
The item to return to the pool.
A generic class for managing a pool of items.