www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Garbage Collection in D

reply Uknown <sireeshkodali1 gmail.com> writes:
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: 
Apr 02 2018
parent Kagamin <spam here.lot> writes:
AFAIK, precise GC was tried not long ago, but was only a little 
slower or something like that.
Apr 02 2018