Table of Contents

Class CoherenceObjectPool<T>

Namespace
Coherence.Toolkit
Assembly
Coherence.Toolkit.dll
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 bool
maxSize int

Properties

CountActive

public int CountActive { get; }

Property Value

int

CountAll

public int CountAll { get; }

Property Value

int

CountInactive

public int CountInactive { get; }

Property Value

int

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