csObjectPool< T > Class Template Reference
This class defines a 'pool' class for the given type. More...
#include <objpool.h>
Public Methods | |
T * | Alloc () |
Get an object from the pool. | |
void | Free (T *o) |
Give an object back to the pool. |
Detailed Description
template<class T>
class csObjectPool< T >
This class defines a 'pool' class for the given type.
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.
Member Function Documentation
|
Get an object from the pool.
Definition at line 39 of file objpool.h. References csArray< T *, csPDelArrayElementHandler< T * > >::Length(), and csPDelArray< T >::Pop(). |
|
Give an object back to the pool.
|
The documentation for this class was generated from the following file:
- csutil/objpool.h
Generated for Crystal Space by doxygen 1.2.18