![]() |
Public API Reference |
![]() |
Class that overrides operator new/operator delete/etc. More...
#include <csutil/customallocated.h>
Class that overrides operator new/operator delete/etc.
with implementations using cs_malloc()/cs_free().
The reason is that the CustomAllocated instance contained in the derived class may take up some memory (in order to have a distinct address in memory), memory which is otherwise unused and wasted. CustomAllocatedDerived<> works around that as it is a base class and can thus be empty; derivation is supported through templating. (For details see http://www.cantrip.org/emptyopt.html .)
Definition at line 46 of file customallocated.h.