Are heap objects never moved by the garbage collector?
Carl Sturtivant
sturtivant at gmail.com
Fri May 31 09:31:38 PDT 2013
"The D Programming Language" (TDPL) p.178 asserts the following.
"The objects themselves stay put, that is their locations in
memory never change after creation."
I take this to mean that the D garbage collector doesn't move
live objects and adjust all references to them the way that some
garbage collectors do. That is to say, the addresses of objects
are not changed by the garbage collector.
Does D guarantee this?
More information about the Digitalmars-d-learn
mailing list