CPoolObject

CPoolObject

Base class that provides custom new and delete operators which use a type-dedicated pool allocator. More...

#include

Detailed Description

Base class that provides custom new and delete operators which use a type-dedicated pool allocator.

The CreateAllocator() static member function offers the ability to lazily create the underlying pool allocator so that it can be, for example, configured according to a CVar.

Note
This approach works only for Ts that are final (or at least their potential derived classes are of the same size as T), violations of this precondition will be caught at runtime with appropriate assertions.