CountedPointer<AnObjectType> p = new AnObjectType(...) ; p->aMethod() ;
This pointer will track the references to the specified resource, which will be deallocated only when nobody references it any more.
For each counted resource, exactly one referent will exist.
Original name: CountedPointer.h Original date: 07/24/99
Implementation of the CountedPointer specification. Uses a 'static default' referent to improve the performance when being default constructed by an array or collection.define CEYLAN_COUNTED_POINTER_USE_COPY_ON_WRITE
Define the above constant if you wish to enable the CountedPointer::isolate member, which is useful for using CountedPointer as the base for a string class that uses copyOnWrite for its non-const members.
Does not deal with circular references.