[Issue 1164] Wrong order of memory deallocation

Marcin Kuszczak aarti at interia.pl
Thu Apr 19 12:35:47 PDT 2007


d-bugmail at puremagic.com wrote:

> 
> "When the garbage collector calls a destructor for an object of a class
> that has members that are references to garbage collected objects, those
> references are no longer valid. This means that destructors cannot
> reference sub objects. This rule does not apply to auto objects or objects
> deleted with the DeleteExpression."
> 

Hmmm... but it doesn't help much with cleaning up on destruction. When
collecting would be done in two phases (1. calling all destructors, 2.
deallocating memory) maybe it would work.

Maybe I should mark it as enhancement?

-- 
Regards
Marcin Kuszczak (Aarti_pl)



More information about the Digitalmars-d-bugs mailing list