FreePOOMA
2.4.1
|
This mixin class provides two functions: new and delete. More...
#include <Pooled.h>
This mixin class provides two functions: new and delete.
It has a static Pool from which it gets and returns memory.
You use this class by inheriting from it like so:
class A : public Pooled { ... };
Pooled is templated on the class that inherits from it so that it will know the size of the blocks to request from the pool.
This technique will not be correct for a class B which inherits from A, so Pooled can only be used for classes which are leaves in the inheritance heirarchy.