Weak References
Jarrett Billingsley
kb3ctd2 at yahoo.com
Thu Aug 7 16:51:05 PDT 2008
"Sean Kelly" <sean at invisibleduck.org> wrote in message
news:g7fv4t$2bce$1 at digitalmars.com...
>
> The last time I tested the WeakRef code the unittest was simply broken
> in that it tried something like this:
>
> WeakRef!(int) r = new int;
> GC.collect();
> assert( r.get() is null );
>
> Problem being that a register still may have a reference to the int value
> that the test expected to be collected. The easiest way around this is to
> perform a second "dummy" allocation in hopes that the relevant registers
> will be overwritten. Once I made this change in the WeakRef code the
> unittest passed for Tango.
For you. For me, it still fails.
More information about the Digitalmars-d
mailing list