[Gc] Re: GC needs to be invoked manually

Martin Wartens martin.wartens at mymail.ch
Mon Aug 15 04:39:26 PDT 2005

Thanks for looking at my program. But it really is a tree structure. Sorry for 
the bad names in the code, I should have replaced them to make it more clear.
To be on the safe side, I tested my program with cycle collection on - no 
effect. [cycle collection can be turned on, I believe, by replacing 
GC_register_finalizer_ignore_self by GC_register_finalizer_no_order in 
gc_cpp.h. I think this should be on by default or at least be selectable by a 
compile switch].
Somebody else suggested to derive from gc instead of gc_cleanup, but that has 
no effect either. I also tried to overwrite global new/delete by the gc-
versions. I also tried all the flavors of threaded/non-threaded static/shared 
libraries. No success.
There must be something evil in the example code (or something extremely 
stupid). The bug is quite breakable, meaning that you can make the example work 
by changing a few things. Meanwhile I replaced all the suspicious data 
structures in my actual program, but I still would like to know what caused 
this problem to avoid it in the future.
Greetings, Martin

More information about the Gc mailing list