API reference
API reference
Select your platform
No SDKs available
No versions available

CircularPool Class

A circular pool of objects that can be reused.
Others
T
Type

Properties

Gets the number of objects in the pool.
Gets the number of objects in use.

Member Functions

This constructor initializes a new instance of the CircularPool class.
It takes in three parameters: the type of primitive to be stored in the pool, the size of the pool, and a set of callbacks that will be used to create and destroy instances of the primitive type. The constructor initializes the pool with the specified size and creates instances of the primitive type using the provided callbacks.
Parameters
primitive
The type of primitive to be stored in the pool.
size
The size of the pool.
callbacks
A set of callbacks that will be used to create and destroy instances of the primitive type.
Get an object from the pool.
Returns
Release an object back to the pool.
Parameters
t
Did you find this page helpful?
Thumbs up icon
Thumbs down icon