Workspace 6.21.5
|
Base class for reference-counted objects. More...
#include <Workspace/Application/LanguageUtils/refcount.h>
Inherited by TemporaryDirectoryImpl.
Public Member Functions | |
void | addRef () |
void | removeRef () |
Protected Member Functions | |
RefCountedObject () | |
RefCountedObject (const RefCountedObject &) | |
virtual | ~RefCountedObject ()=0 |
RefCountedObject & | operator= (const RefCountedObject &rhs) |
Based on Item 29 in "More Effective C++", Scott Meyers.
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedpure virtualdefault |
|
inline |
Increments the reference count for this object.
|
inlineprotected |
rhs | Unused. |
The assignment operator is a no-op. It simply returns the current object unchanged. It is assumed that something else is in control of the reference count, such as RefCountedObjectPtr or RefCountedPtr. This is consistent with the constructors, which create the object with a zero reference count.
|
inline |
Decrements the reference count for this object. If the reference count reduces to zero, the object is deleted.