The Pedigree Project
0.1
|
#include <ObjectPool.h>
Public Member Functions | |
template<typename... Args> | |
T * | allocate (Args...args) |
void | deallocate (T *object) |
Private Attributes | |
Vector< T * > | m_Pool |
Spinlock | m_Spinlock |
ObjectPool manages a set of objects for rapid allocation and deallocation, which is particularly useful for objects which are used frequently (e.g. nodes in a list).
If no objects are available (none have been deallocated yet), new objects are allocated from the heap.
Definition at line 42 of file ObjectPool.h.