|
LibMusicXML 3.22
|
the base class for smart pointers implementation More...
#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 (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.