Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
Memory manager allowing to create and delete objects in a memory efficient way. More...
Public Types | |
typedef CorePoolBase< T, InPlaceChunkItem< T > > | BaseType |
Public Member Functions | |
CorePool (const unsigned int &chunk_size=128) | |
Constructor. | |
T * | alloc_object () |
Gets the pointer of an available object. Do not call the object constructor. | |
void | free_object (T *obj) |
Frees the object with specified pointer. Do not call the object destructor. | |
T * | new_object () |
Gets the pointer of an available object. Call the object constructor. | |
void | delete_object (T *obj) |
Frees the object with specified pointer. Call the object destructor. | |
![]() | |
CorePoolBase (const unsigned int &chunk_size=128) | |
unsigned int | get_allocated_object_count () const |
unsigned int | get_used_object_count () const |
virtual size_t | get_memory_size () const |
Protected Member Functions | |
T * | get_unused_object () |
![]() | |
void | set_unused_object (T *object) |
Additional Inherited Members | |
![]() | |
InPlaceChunkItem< T > ** | m_chunk_array |
InPlaceChunkItem< T > * | m_first_free |
unsigned int | m_chunk_size |
unsigned int | m_chunk_array_size |
unsigned int | m_chunk_count |
unsigned int | m_object_count |
Memory manager allowing to create and delete objects in a memory efficient way.
Constructors are called only once for the first use of objects. Destructors are called only for used objects during the pool destruction.