Destructor nonsense on dlang.org

David Nadlinger see at klickverbot.at
Thu May 24 09:17:15 PDT 2012


On Thursday, 24 May 2012 at 16:06:23 UTC, Andrei Alexandrescu 
wrote:
> On 5/24/12 9:57 AM, Alex Rønne Petersen wrote:
>> Doesn't matter: Nothing is guaranteed about order of 
>> finalization (and
>> this is reasonable). Thus, the finalizers can be run in any 
>> arbitrary
>> order. The important point here is that they are run *at all*.
> It does matter because a destructor may use an object that has 
> just been destroyed.

You can't do that in today's D either, going by the spec as well 
by the actual implementation.

David


More information about the Digitalmars-d mailing list