Garbage objects are objects that are on this default list at destruct time (see defaultListSize() and defaultListGet()); they are practically objects owned by this module or channel that have not been deallocated by destructors of derived classes.

This feature is turned off by default, because it cannot be implemented to work correctly in all cases. The garbage collection routine invokes the delete operator on all objects on the default list. This, however, causes problems (crash) in some cases: when the object has been allocated as an element in an array (e.g. new cQueue[10]), when the object is part of another object (e.g. struct X {cQueue q;};), or any other case when the object's pointer is not deleteable. Note that the presence of such data structures in a module does not automatically rule out the use of the final GC mechanism. Final GC can still be turned on if care is taken that the module's destructor deallocates those arrays and structs/objects, so that the contained objects disappear before the GC process could see them. Conclusion: only turn on final GC if you know what you are doing.

The documentation for this class was generated from the following file: