SimpleObjectPool

Description

sealed class Tinman.Core.System.SimpleObjectPool
<TObject ref : IMemoryConsumption>

Derived from

IObjectPool<TObject, int32>
IDeletable

A non-disposable and non-thread-safe pool for objects of the same kind, with a fixed limit for the object count.

See also

ObjectPoolUtil

Public / Constructors

Simple­Object­Pool


public constructor SimpleObjectPool → (4)

name in : string

[not-empty]
The object pool name.

factory in : IObjectPoolFactory<TObject, int32>

[not-null]
The pool object factory to use.

limitCount in : int32

[>0]
Maximum number of pooled objects to hold.

registered opt : bool = true

Register this pool with ObjectPoolUtil? The IDeletable.Delete method should be called on registered pools when they are no longer used.

Creates a new instance of SimpleObjectPool.