#include <smartpointer.h>

Public Member Functions | |
| unsigned | refs () const |
| gives the reference count of the object | |
| void | addReference () |
| addReference increments the ref count and checks for refCount overflow | |
| void | removeReference () |
| removeReference delete the object when refCount is zero | |
Protected Member Functions | |
| smartable () | |
| smartable (const smartable &) | |
| virtual | ~smartable () |
| destructor checks for non-zero refCount | |
| smartable & | operator= (const smartable &) |
Any object that want to support smart pointers should inherit from the smartable class which provides reference counting and automatic delete when the reference count drops to zero.
| smartable::smartable | ( | ) | [inline, protected] |
| smartable::smartable | ( | const smartable & | ) | [inline, protected] |
| virtual smartable::~smartable | ( | ) | [inline, protected, virtual] |
destructor checks for non-zero refCount
| void smartable::addReference | ( | ) | [inline] |
addReference increments the ref count and checks for refCount overflow
| unsigned smartable::refs | ( | ) | const [inline] |
gives the reference count of the object
| void smartable::removeReference | ( | ) |
removeReference delete the object when refCount is zero
1.5.8