|
wavelength 1.0.0
|
Reference-counted root of the engine's polymorphic object graph. More...
#include <attachment.h>

Public Member Functions | |
| Attachment () | |
| Construct an object with no reference. | |
| virtual | ~Attachment () |
| Release the object. | |
| void | AddRef () |
| Take one reference. | |
| void | Release () |
| Give back one reference and delete the object once the last one is gone. | |
Static Public Member Functions | |
| static void | ReleaseIfSet (Attachment *pAttachment) |
| Give back one reference to an object that may be null. | |
Reference-counted root of the engine's polymorphic object graph.
The RTTI includes the class name and records no base. The one data word is declared first. The vptr therefore sits after it at +0x04, and the class is eight bytes. The vtable at 0x003d6dd8 runs the type function and the destructor.
A fresh object starts with no reference. Each owner takes one through AddRef(), Ptr does so for the object it holds, and the last Release() deletes the object through the virtual destructor.
Some callers increment mRefs directly rather than through AddRef(). Access from an unrelated class is why the field is public rather than protected.
|
inline |
Construct an object with no reference.
Inline. Every derived constructor expands it.
|
virtual |
Release the object.
| void Attachment::AddRef | ( | ) |
Take one reference.
| void Attachment::Release | ( | ) |
Give back one reference and delete the object once the last one is gone.
|
inlinestatic |
Give back one reference to an object that may be null.
Passed as a function to std::for_each by the command scheduler, the phrase database, and the playback reader. The body is inline. The title is inferred.
| pAttachment | The object, or null. |