CircularPool
(
primitive
, size
, callbacks
)
|
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.
Signature
CircularPool(T primitive, int size, Callbacks callbacks) Parameters primitive: TÂ
The type of primitive to be stored in the pool.
size: intÂ
The size of the pool.
callbacks: CallbacksÂ
A set of callbacks that will be used to create and destroy instances of the primitive type.
|
CountActive
: override int
[Get] |
Gets the number of objects in use.
Signature
override int CountActive |
CountAll
: override int
[Get] |
Gets the number of objects in the pool.
Signature
override int CountAll |
Get
()
|
Get an object from the pool.
Signature
override T Get() Returns override T |
Release
(
t
)
|
Release an object back to the pool.
Signature
override void Release(T t) Parameters t: TReturns override void |