Garbage collection progress delegate
Frank Benoit
benoit__ at __tionex.de
Mon Apr 10 14:37:26 PDT 2006
Craig Black schrieb:
>> The main problem is the moving reference. Without that problem, it would
>> be much easier to make a concurrent gc not interrupting the program.
>
> I don't know a lot about GC. What is the moving reference?
>
> -Craig
>
>
- 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!
More information about the Digitalmars-d
mailing list