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:24:42 PDT 2007


downs wrote:
> 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.
Erm. Sorry, it's early in the morning.
By "local variables" I mean member variables that are a part of the
class instance, i.e. that don't reference separate memory on the heap.

>  --downs
 --downs



More information about the Digitalmars-d mailing list