4 Aug
2006
4 Aug
'06
6:33 p.m.
On Fri, Aug 04, 2006 at 11:53:23AM -0400, Ondrej Certik wrote:
You need to use a garbage collector, if you don't want to delete instances by yourself.
[snipped]
Like this:
#include <iostream> #include "gc_cpp.h"
class basic: public gc //class basic { public: basic() {}; };
you need to inherit basic from "gc". gc_cpp is from http://www.hpl.hp.com/personal/Hans_Boehm/gc/
1) I don't really understand why one needs such a GC for simple tree-like data types. 2) As a matter of fact, using general-purpose conservative GC prevents one from solving any real-world problems (see Mathematica). Best regards, Alexei. -- All science is either physics or stamp collecting.