Collaboration diagram for CThing:

Public Member Functions | |
| void | Construct (CProcessData *owner) |
| The Construct function sets up the internal structure of the CThing object. | |
| void | Destruct () |
| The Destruct function properly de-allocates and cleans up the internal structure of a CThing. | |
Public Attributes | |
| long | refcount |
| the number of references to this rebi instance | |
| unsigned long | flags |
| flags for this rebi | |
| CDefinition * | def |
| the definiton associated with the CThing, always valid and non-null | |
| CLocal * | local |
| the local instance associated with the thing, may be null for rebi that are not instances | |
| CProcessData * | ownerprocess |
| the process this CThing belongs to, is always valid and non-null | |
| HANDLE | mutex |
| the unique mutex for this CThing | |
| CThingArray | pointedto |
| a list of pointers of CThings that reference this one, used for garbage collection | |
The CThing itself only keeps track of garbage collection infromation, and special flags. All other data is stored inside the CDefinition and possibly inside a CLocal if it is an instance. CThings each have an internal mutec that should be acquired before using their member variables.
|
|
The Construct function sets up the internal structure of the CThing object. If you create a CDefinition though a call to malloc or new you must call its construct function after creating it. The Construct function is properly used by any functions in this API that returns a new CThing.
|
|
|
The Destruct function properly de-allocates and cleans up the internal structure of a CThing. If you are manually destroying a CThing by any method you must call Destruct on it before doing so. Failure to call Destruct will cause memory leaks.
|
1.4.2