ObjectPool

StockSharp.Xaml.Charting.Common.Helpers

Represents a pool of objects with a size limit.

Implements: IDisposable

Constructors

ObjectPool()

Initializes a new instance of the ObjectPool class.

ObjectPool(int, Func<T, T>)

Initializes a new instance of the ObjectPool class.

Properties

AvailableCount : int

Gets the amount of pooled instances

Count : int

Gets the summary amount of created instances

IsEmpty : bool

Gets the value indicating whether current ObjectPool instance is empty.

Methods

Dispose()

Disposes of items in the pool that implement IDisposable.

Get() : T

Retrieves an item from the pool.

Returns: The item retrieved from the pool.

Get(Func<T, T>) : T

Retrieves an item from the pool.

Returns: The item retrieved from the pool.

Get(Func<T>) : T

Retrieves an item from the pool.

Returns: The item retrieved from the pool.

Put(T)

Places an item in the pool.

item
The item to place to the pool.