The GC (agian)

FeepingCreature feepingcreature at gmail.com
Wed Nov 24 09:29:07 UTC 2021


On Tuesday, 23 November 2021 at 14:02:34 UTC, Ola Fosheim Grøstad 
wrote:
> On Tuesday, 23 November 2021 at 13:46:28 UTC, Imperatorn wrote:
>> I get the feeling that some ppl still believe the GC sneaks in 
>> some backdoor and says hello
>
> The GC also has to scan non-GC memory if that memory can point 
> back to GC-memory.
>

To be fair, it only does that if you explicitly register the 
non-GC memory with `GC.addRoot`. If you don't do this, GC memory 
can indeed be freed prematurely while still being referenced from 
non-GC memory.


More information about the Digitalmars-d mailing list