Container.Collect

generic GC allocation manager

Slow and expensive in memory costs

Members

Functions

allocate
T* allocate()

allocate a T sized memory chunk

allocate
T*[] allocate(size_t count)

allocate an array of T sized memory chunks

collect
void collect(T* p)

Invoked when a specific T[] is discarded

collect
void collect(T*[] t)

Invoked when a specific T[] is discarded

collect
bool collect(bool all)

Invoked when clear/reset is called on the host. This is a shortcut to clear everything allocated.

config
void config(size_t chunks, int allocate)

set the chunk size and prepopulate with nodes

Meta