Click or drag to resize

PoolT Class

A light-weight pool class. Can be used out of the box, or as base for more sophisticated pools.
Inheritance Hierarchy
SystemObject
  Gamelogic.ExtensionsPoolT

Namespace:  Gamelogic.Extensions
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class Pool<T>
where T : class

Type Parameters

T
The type of the objects to pool.

The PoolT type exposes the following members.

Constructors
  NameDescription
Public methodPoolT
Initializes a new instance of the PoolT class.
Top
Properties
  NameDescription
Public propertyCapacity
The number total objects in the pool (awake and asleep).
Public propertyIsObjectAvailable
Returns whether there is a sleeping object available.
Top
Methods
  NameDescription
Public methodDecCapacity
Decreases the capacity of the pool.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetNewObject
Gets a new object from the pool.
Public methodGetType (Inherited from Object.)
Public methodIncCapacity
Increases thew capacity of the pool.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRelease
Releases the specified object back to the pool.
Public methodToString (Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodThrowIfNull
Throws a NullReferenceException if the object is null.
(Defined by ObjectExtensions.)
Top
See Also