Finalize GC memory
Namespace
rswhite4 at googlemail.com
Mon Jun 17 15:10:03 PDT 2013
On Monday, 17 June 2013 at 17:09:45 UTC, Steven Schveighoffer
wrote:
> On Sun, 16 Jun 2013 17:37:15 -0400, Namespace
> <rswhite4 at googlemail.com> wrote:
>
>> But if I call 'destroy' before I call GC.free, it does not
>> work correct.
>
> Destroy puts anything back into it's initial state. So for
> anything that is a pointer, destroy will set it to null! Then
> calling GC free on null is no good.
>
> What you have to do is save a copy of the pointer, to pass to
> GC.free later.
>
> -Steve
Ok, thanks.
And you think that my code is working as intended? Or have I
overlooked something obvious.
More information about the Digitalmars-d-learn
mailing list