Garbage collection progress delegate
Craig Black
cblack at ara.com
Mon Apr 10 14:51:15 PDT 2006
> - start of gc collecting cycle
> - gc scans refb, which is null
> - gc calls your delegate
> - in your delegate refb = refa; refa = null;
> - your delegate ends, gc continues ('thinking' refb is null)
> - scans refa, which is now null also
> -> GC: Oh, no ref to obj, I can free it!
Hmmm. I don't see this as a showstopper. Just avoid assigning references
when providing feedback. (Use of the GC delegate would be for advanced
users anyway.)
-Craig
More information about the Digitalmars-d
mailing list