Functions | |
CENTUMSHAREDCODE_API void | AddCThingReference (CThing *thing) |
Increases the reference count of a CThing object. | |
CENTUMSHAREDCODE_API void | AddDefReference (CDefinition *def) |
Increases the reference count of a CDefinition object. | |
CENTUMSHAREDCODE_API void | ReleaseCThing (CThing *thing) |
Decrements the reference count of a CThing object and releases its memory if appropriate. | |
CENTUMSHAREDCODE_API void | ReleaseCDefinition (CDefinition *def) |
Decrements the reference count of a CDefinition object and releases its memory if appropriate. | |
CENTUMSHAREDCODE_API void | AddCThingReferenceGC (CThing *thing, CThing *from) |
Increases the reference count of a CThing object and adds a backtrace pointer for garbage collection. | |
CENTUMSHAREDCODE_API void | ReleaseCThingGC (CThing *thing, CThing *from) |
Removes the appropriate back-pointer fromt the CThing parameter and decrements its reference count, releasing it if appropriate. | |
CENTUMSHAREDCODE_API void | GarbageCollect (CThing *thing) |
Traces through the back-pointers stored in a thing and releases it if it is in a closed memory loop. |
|
Increases the reference count of a CThing object. Each call to AddCThingReference must be matched to a single call to ReleaseCThing somewhere. AddCThinReference needs to acquire the mutex assocaited with the CThing object.
|
|
Increases the reference count of a CThing object and adds a backtrace pointer for garbage collection. Each call to AddCThingReferenceGC must be matched to a single call to ReleaseCThingGC somewhere. AddCThinReferenceGC needs to acquire the mutex assocaited with the CThing object. This function adds the from pointer to the pointedto member of the thing parameter. The function itself calls AddCThingReference to increase the reference count.
|
|
Increases the reference count of a CDefinition object. Each call to AddDefReference must be matched to a single call to ReleaseCDefinition somewhere. AddDefReference needs to acquire the mutex assocaited with the CDefinition object.
|
|
Traces through the back-pointers stored in a thing and releases it if it is in a closed memory loop. Calling Garbage collect on a CThing that has a reference count greater than its number of back-pointers is an error. This function operates by searching through each back pointer and then througn the back-pointers of all objects that can be found though back-pointers until either an object that has a reference count greater than its number of back pointers is found or all possible backpointers have been fully searched through. If the second is the case than the object is is a closed memory loop and this function releases it in the same manner that ReleaseCThing does, altough it does not call this function. Releasing this one CThing should release the entire memory loop.
|
|
Decrements the reference count of a CDefinition object and releases its memory if appropriate. Calling ReleaseCDefinition more times than you have called AddDefReference is an error. This function needs to acquire the mutex associated with the definition. If you have aquired it you must release it before calling this function. ReleaseCThing is called on all static members.
|
|
Decrements the reference count of a CThing object and releases its memory if appropriate. Calling ReleaseCThing more times than you have called AddCThingReference is an error. This function needs to acquire the mutex associated with the CThing. If you have aquired it you must release it before calling this function. If the reference count of the CThing is equal to the number of backpointers it has then GarbageCollect is called, which may or may not release it. Otherwise if its reference count is zero the objects locals and data are de-referenced, it is untied from other variables, and its memory is freed.
|
|
Removes the appropriate back-pointer fromt the CThing parameter and decrements its reference count, releasing it if appropriate. Calling ReleaseCThingGC more times than you have called AddCThingReferenceGC is an error. Likewise each call to AddCThingReferenceGC needs to be matched to a call to ReleaseCThingGC with the same from parameter. Internally the reference count it decremented through a call to ReleaseCThing.
|