GC BUG: Referenced object destroyed before released
Vladimir Panteleev
thecybershadow at gmail.com
Sun Mar 16 07:15:36 PDT 2008
On Sun, 16 Mar 2008 15:45:14 +0200, Koroskin Denis <2korden at gmail.com> wrote:
> In this code we don't explicitly destroy anything, so GC chooses the order
> of object destruction. And it chooses wrong.
Quoting from http://www.digitalmars.com/d/1.0/class.html#destructors :
> Furthermore, the order in which the garbage collector calls destructors for unreference objects is not specified.
So, it's not a bug :) You can't rely on the order of which objects will be destroyed.
--
Best regards,
Vladimir mailto:thecybershadow at gmail.com
More information about the Digitalmars-d
mailing list