Componentizing D's garbage collector
Timon Gehr
timon.gehr at gmx.ch
Tue Jan 14 10:38:18 PST 2014
On 01/14/2014 06:56 PM, Benjamin Thaut wrote:
>> Once it becomes known that an object should be pinned, it is too late
>> for moving. (There will then exist a potential pointer to the object.)
>
> Well no, usually you have to pin objects _before_ passing them to
> C-land. Pinning is not a automatic process its done manually (or by the
> compiler).
BTW, our misunderstandings are rooted here:
http://dlang.org/garbage.html
"Object Pinning and a Moving Garbage Collector
Although D does not currently use a moving garbage collector, by
following the rules listed above one can be implemented. No special
action is required to pin objects. A moving collector will only move
objects for which there are no ambiguous references, and for which it
can update those references. All other objects will be automatically
pinned."
More information about the Digitalmars-d
mailing list