ExtraAlloc

To manage allocating extra for cases like lists where you need to create new objects often. Also manages initializing the objects through a init function. Creates a number of extra objects at one time, so it has to allocate memory less often.

Constructors

this
this(uinteger extraAllocCount, uinteger maxAllocCount, T delegate() initFunction)

constructor

Destructor

~this
~this()

destructor. Destroys all objects created by this

Members

Functions

allocate
bool allocate()

allocates and initializes objects to fill extraAllocCount

free
void free(T obj)

Marks an object as free. Frees is if there are already enough free objects

get
T get()

Meta