Click or drag to resize

IObjectPoolT Interface

[This is preliminary documentation and is subject to change.]

Defines an interface for the pooling and recycling of objects of type T.

Namespace:  Umbrace.Unity.PurePool
Assembly:  Umbrace.Unity.PurePool (in Umbrace.Unity.PurePool.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public interface IObjectPool<T> : IObjectPool

Type Parameters

T
The type of object being pooled.

The IObjectPoolT type exposes the following members.

Properties
  NameDescription
Public propertyCount
Gets the number of objects currently contained by the pool.
(Inherited from IObjectPool.)
Public propertyInstantiateWhenEmpty
Gets or sets a value indicating whether the pool should instantiate a new object when the pool is empty, and an attempt is made to acquire from the pool.
(Inherited from IObjectPool.)
Public propertyItems
Gets a list of items currently contained by the pool.
Public propertyMaximumSize
Gets or sets the maximum size of the pool, which is the maximum number of objects it can contain.
(Inherited from IObjectPool.)
Top
Methods
  NameDescription
Public methodAcquire
Acquires an object from the pool.
Public methodClear
Clears the pool, emptying it of all pooled objects.
(Inherited from IObjectPool.)
Public methodFill
Fills the pool, populating it with pooled objects until it reaches the maximum pool size.
(Inherited from IObjectPool.)
Public methodGetItems
Public methodRelease
Releases an object back to the pool.
Public methodSetSize
Sets the number of objects contained by the pool, either destroying excess pooled objects, or instantiating new ones.
(Inherited from IObjectPool.)
Public methodTryAcquire
Acquires an object from the pool.
Top
See Also