#include <OTC/memory/cluster.hh> class OTC_Cluster {
public:
OTC_Cluster();
OTC_Cluster(size_t theBlockSize, size_t theSlop=16);
~OTC_Cluster();
};
OTC_Cluster
class is a pool of objects which are to
be deleted at the same time. Memory for the objects is
allocated from a memory arena.
class Foo : public OTC_MCObject { protected: ~Foo(); };
OTC_Cluster cluster;
Foo* foo = new (cluster) Foo;
OTC_Cluster();
OTC_Arena
class will be as per the default for
that class.
OTC_Cluster(size_t theBlockSize, size_t theSlop=16);
theBlockSize
and theSlop
are passed onto the
OTC_Arena
. theSlop
defaults to 16
.
~OTC_Cluster();
OTC_MCObject
, OTC_Arena