On Sat, 20 Sep 2014 20:14:35 +0000
Gary Willoughby via Digitalmars-d-learn
<digitalmars-d-learn@puremagic.com> wrote:

> How does GC.addRange work? i.e. what is it doing? I'm assuming 
> reading the docs that it adds a range for the GC to scan but what 
> actually happens? Does the GC look into this range and check for 
> the existence of pointers it's currently managing?
yes. this adds GC "root". but normal GC root is just a single pointer,
and "range root" as a memory region that will be scanned for pointers
(i.e. something like "array of pointers").

note that scan is conservative, so if you happen to have some integer
value that can be interpreted as pointer to GC-managed memory, it will
be considered as pointer.

Attachment: signature.asc
Description: PGP signature

Reply via email to