GenericPool<T0>.Get

Declaration

public static T Get();

Returns

T A pooled object or a new instance if the pool is empty.

Description

Get an instance from the pool. If the pool is empty then a new instance will be created.


Declaration

public static PooledObject<T> Get(out T value);

Parameters

value Out parameter that will contain a reference to an instance from the pool.

Returns

PooledObject<T> A PooledObject that will return the instance back to the pool when its Dispose method is called.

Description

Returns a PooledObject that will automatically return the instance to the pool when it is disposed.


Did you find this page useful? Please give it a rating: