ObjectPool<T> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Simple object pool that uses a stack to store available objects.
public class ObjectPool<T> : Orleans.Providers.Streams.Common.IObjectPool<T> where T : PooledResource<T>
type ObjectPool<'T (requires 'T :> PooledResource<'T>)> = class
interface IObjectPool<'T (requires 'T :> PooledResource<'T>)>
Public Class ObjectPool(Of T)
Implements IObjectPool(Of T)
Type Parameters
- T
- Inheritance
-
ObjectPool<T>
- Implements
Constructors
ObjectPool<T>(Func<T>, IObjectPoolMonitor, Nullable<TimeSpan>) |
Simple object pool |
Methods
Allocate() |
Allocates a pooled resource |
Free(T) |
Returns a resource to the pool |