lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
Object pool. More...
#include <object_pool.h>
Inherits noncopyable.
Public Types | |
typedef Element | value_type |
Value type. | |
typedef Heap | heap_type |
Heap type. | |
typedef heap_type::size_type | size_type |
Size type. | |
Public Member Functions | |
LEAN_INLINE | object_pool (size_type chunkSize=ChunkSize) |
Constructor. | |
LEAN_INLINE | ~object_pool () |
Destructor. | |
void | clear () |
Destructs all objects and frees all chunks allocated by this allocator. | |
LEAN_INLINE void * | allocate () throw () |
Places the given value into this object pool. Copy construction MAY NOT THROW. | |
LEAN_INLINE Element * | place (const Element &value) throw () |
Places the given value into this object pool. Copy construction MAY NOT THROW. | |
Static Public Attributes | |
static const size_type | chunk_size = ChunkSize |
Chunk size. | |
static const size_type | alignment = Alignment |
Alignment. |
Object pool.