AutoCtorPool

Extends ObjectPool by creating items (instances of T) automatically with "new T(Args)".

Constructors

this
this(Args args)

Constructor

Members

Functions

fill
typeof(this) fill(size_t num)

Ensures that the pool contains at least the specified number of items. Useful to pre-allocate a pool of a certain size.

get
ItemType get()

Gets an object from the object pool.

Static functions

newPool
typeof(this) newPool(Args args)

Creates a new instance.

Parameters

T

type stored in pool

Args

tuple of T constructor argument types.

Meta