Right now, what's the most important for the success and adoption of D?

downs default_357-line at yahoo.de
Sat Sep 29 23:23:25 PDT 2007


Patrick Kreft wrote:
> I know so long exist an instance of MyClass so her resource will exist
> too, or the GC is useless cuz he make man class useless.
 ... Yes. We know that.
That's not the problem.
The problem is that _when the destructor is called_ (emphasis), the GC
might already have cleaned up your member variables. So you can't do
clean-up in the destructor on _anything_ but local variables. Strings
might be gone. AAs might be gone. To sum it up, it sucks.
Hope that made things clearer.
 --downs



More information about the Digitalmars-d mailing list