Edit

Share via


ObjectPool<T> Class

Definition

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

Applies to