NAME
OTC_Cluster -
Pool of objects which are to be deleted at the same time.
SYNOPSIS
#include <OTC/memory/cluster.hh>
class OTC_Cluster
{
public:
OTC_Cluster();
OTC_Cluster(size_t theBlockSize, size_t theSlop=16);
~OTC_Cluster();
};
CLASS TYPE
Concrete
DESCRIPTION
The 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.
EXAMPLE
class Foo : public OTC_MCObject { protected: ~Foo(); };
OTC_Cluster cluster;
Foo* foo = new (cluster) Foo;
INITIALISATION
OTC_Cluster();
Creates an empty cluster. Memory
allocation used by the OTC_Arena
class will be as per the default for
that class.
OTC_Cluster(size_t theBlockSize, size_t theSlop=16);
Creates an empty cluster. theBlockSize
and theSlop are passed onto the
OTC_Arena. theSlop defaults to 16.
DESTRUCTION
~OTC_Cluster();
The destructor for each object in the
cluster is invoked, and memory released
back to the system. The order in which
objects are destroyed is such that the
most recently allocated object is
destroyed first.
SEE ALSO
OTC_MCObject, OTC_Arena
LIBRARY
OTC
AUTHOR(S)
Graham Dumpleton
COPYRIGHT
Copyright 1994 TELSTRA CORPORATION LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED