Class CoherenceObjectPool<T>
public class CoherenceObjectPool<T> where T : class
Type Parameters
T
- Inheritance
-
CoherenceObjectPool<T>
Constructors
CoherenceObjectPool(Func<T>, Func<T, bool>, Action<T>, Action<T>, bool, int)
public CoherenceObjectPool(Func<T> createFunc, Func<T, bool> actionOnGet = null, Action<T> actionOnRelease = null, Action<T> actionOnDestroy = null, bool collectionCheck = true, int maxSize = 10000)
Parameters
createFunc
Func<T>actionOnGet
Func<T, bool>actionOnRelease
Action<T>actionOnDestroy
Action<T>collectionCheck
boolmaxSize
int
Properties
CountActive
public int CountActive { get; }
Property Value
CountAll
public int CountAll { get; }
Property Value
CountInactive
public int CountInactive { get; }
Property Value
Methods
Clear()
public void Clear()
Dispose()
public void Dispose()
ForceGet(T)
public void ForceGet(T instance)
Parameters
instance
T
Get()
public T Get()
Returns
- T
Release(T)
public void Release(T element)
Parameters
element
T