vtf-logo

ObjectCounter Class Reference

Provides a reference counting base class. More...

#include <ObjectCounter.h>

Inheritance diagram for ObjectCounter:

BBoxList GridBoxList GridDataBucketVoid GridUnitList GridDataBucket< Type > List of all members.

Detailed Description

Provides a reference counting base class.

The class counts the number of references to itself and destroys itself when the count goes to zero. Subclasses should be manipulated as follows: class CountedClass : public ObjectCounter { ... } CountedClass *x = new CountedClass(...); CountedClass *y = (CountedClass *) x->alias(); x->free(); y->free(); To avoid forcing the case on alias(), define an alias() in the subclass which does the cast for you.

Author:
: Scott Kohn (skohn@cs.ucsd.edu)


The documentation for this class was generated from the following file:
Generated on Fri Aug 24 13:00:29 2007 for AMROC's Hierachical Data Structures - by  doxygen 1.4.7