Pool<T>¶
Warning
This documentation is for an implementation of a service. This class is not meant to be used directly; instead use the Protogame.IPool service via dependency injection to access this functionality.
Information documented here may not be up to date.
-
class
Pool<T>
: System.Object, IPool<T>, IRawPool An implementation of an T:Protogame.IPool`1 which manages an array of objects. This implementation does not allocate the objects for you; you need to initialize an array of objects which is then used in this implementation.
It’s recommended that you use T:Protogame.ScalingPool`1 instead, creating it via T:Protogame.IPoolManager.
Type Parameters: - T –
-
readonly int
Free
-
readonly int
Total
-
readonly string
Name
-
readonly int
NextAvailable
-
readonly int
NextReturn
-
public Protogame.T
Get
()
-
public void
Release
(Protogame.T instance) Parameters: - instance (Protogame.T) –
-
public void
ReleaseAll
()