Uh... destructors?

%u wfunction at hotmail.com
Tue Feb 22 10:15:03 PST 2011


>> Well, the trouble is, pretty much all of these are invalid
attributes:
>> - static obviously makes no sense
> And here is where you're wrong. You have defined a static
destructor, which is called with module destructor as the program
goes out of scope, rather than when your struct or class is
destroyed.

Oops... I knew that, but I totally forgot about it when I wrote
this; good catch.

So okay, fine... 2 out of about 8. That still doesn't mean the rest
of them should be allowed, though... think about how confusing code
with a "pure" destructor would be.


More information about the Digitalmars-d mailing list