Garbage Collection in D

Uknown sireeshkodali1 at gmail.com
Tue Apr 3 01:08:01 UTC 2018


The Garbage Collection page of the spec 
(https://dlang.org/spec/garbage.html) mentions that it is 
undefined behaviour to store pointers to GC memory in non pointer 
types. Is this a relic of the past? I've seen a lot of people 
here on the forum saying that the GC needs to be conservative 
because D is a systems programming language. Wouldn't it be legal 
to make a Garbage Collector that uses type info, since the 
language allows it?

I think it should be noted though that druntime states that 
memory is always conservatively scanned: 
https://dlang.org/phobos/core_memory.html


More information about the Digitalmars-d mailing list