ObjectPool
(
generator
, preload
)
|
A constructor that takes a specified object generation function
Signature
Meta.WitAi.ObjectPool< T >.ObjectPool(Func< T > generator, int preload=0) Parameters generator: Func< T >preload: int |
Dispose
()
|
Immediately unload all available items
Signature
void Meta.WitAi.ObjectPool< T >.Dispose() Returns void |
Get
()
|
Take an object from the pool or generate if none are available
Signature
T Meta.WitAi.ObjectPool< T >.Get() Returns T |
Preload
(
total
)
|
Generates and returns a specified amount of objects
Signature
void Meta.WitAi.ObjectPool< T >.Preload(int total) Parameters total: intReturns void |
Return
(
item
)
|
Return an item to the pool
Signature
void Meta.WitAi.ObjectPool< T >.Return(T item) Parameters item: TReturns void |