TMCCountedObject Class Reference
[MCCore]
List of all members.
Detailed Description
Counted objects are objects that use a counter to keep track of how many other objects need them, and delete themselves when nobody needs them anymore. A counted object has an AddRef method that increments its counter, and a Release method that decrements it. When the value of the counter reaches zero, the object is deleted.
Take a look at TMCCountedCreateHelper to see how to create and return a counted object
- Note:
- If your object can be accessed by two threads at the same time, you ought to derive it from TMCSMPCountedObject (it uses an atomic counter).
Constructor & Destructor Documentation
TMCCountedObject::TMCCountedObject |
( |
void |
|
) |
[protected] |
virtual TMCCountedObject::~TMCCountedObject |
( |
|
) |
[protected, virtual] |
Member Function Documentation
uint32 TMCCountedObject::AddRef |
( |
|
) |
[inline, virtual] |
void TMCCountedObject::operator delete |
( |
void * |
block |
) |
|
void TMCCountedObject::operator delete[] |
( |
void * |
block |
) |
|
void* TMCCountedObject::operator new |
( |
MCSize |
byteCount |
) |
throw () |
void* TMCCountedObject::operator new[] |
( |
MCSize |
byteCount |
) |
throw () |
virtual MCErr MCCOMAPI TMCCountedObject::QueryInterface |
( |
const MCIID & |
riid, |
|
|
void ** |
ppvObj | |
|
) |
| | [virtual] |
uint32 TMCCountedObject::Release |
( |
|
) |
[inline, virtual] |
Member Data Documentation
The documentation for this class was generated from the following file: