![]() |
Public API Reference |
#include <objpool.h>
Public Methods | |
T * | Alloc () |
Get an object from the pool. More... | |
void | Free (T *o) |
Give an object back to the pool. More... |
This class can be used to create objects of the given type, but it will re-use older objects if possible to save time. For this reason, unused objects of the given type should not be deleted but given to the pool.
Definition at line 32 of file objpool.h.
|
Get an object from the pool.
Definition at line 39 of file objpool.h. References csArray< T *, csPDelArrayElementHandler< T * > >::Length, and csPDelArray::Pop. |
|
Give an object back to the pool.
Definition at line 48 of file objpool.h. References csArray< T *, csPDelArrayElementHandler< T * > >::Push. |