Standard library » Containers » Pool module

A fixed capacity object pool, where allocation and release are O(1) operations.

A pool doesn't destroy its elements in its destructor, they must be destroyed manually.

It doesn't throw exceptions. Instead, asserts are used to ensure valid usage.

Files

file bn_generic_pool.h
file bn_generic_pool_fwd.h
file bn_pool.h
file bn_pool_fwd.h

Classes

class bn::igeneric_pool_base
Base class of igeneric_pool.
template<int MaxElementSize>
class bn::igeneric_pool
Base class of generic_pool.
template<int MaxElementSize, int MaxSize>
class bn::generic_pool
igeneric_pool implementation that uses a fixed size buffer.
template<typename Type>
class bn::ipool
Base class of bn::pool.
template<typename Type, int MaxSize>
class bn::pool
bn::ipool implementation that uses a fixed size buffer.