Interface IObjectPoolPolicy<T>
Contract used by ObjectPool<T> to define how to create and return instances to a pool.
Namespace:CacheManager.Core.Utility
Assembly:CacheManager.Core.dll
Syntax
public interface IObjectPoolPolicy<T>
Type Parameters
Name | Description |
---|---|
T | The type of objects of the pool. |
Methods
| Improve this Doc View SourceCreateNew()
Creates a new instance of T.
Declaration
T CreateNew()
Returns
Type | Description |
---|---|
T | The new instance. |
Return(T)
Checks if the instance can be returned and may reset the instance to a state which can be reused.
Declaration
bool Return(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The instance which should be returned. |
Returns
Type | Description |
---|---|
Boolean |
|