Thread overview
Role of third argument to GC.addRange
Oct 27, 2017
Nordlöw
Oct 27, 2017
Adam D. Ruppe
October 27, 2017
The docs for the third argument to

https://dlang.org/library/core/memory/gc.add_range.html

says:

"The GC might use this information to improve scanning for pointers or to call finalizers."

Can somebody elaborate a bit on what "improve scanning" means here?
October 27, 2017
On Friday, 27 October 2017 at 14:18:02 UTC, Nordlöw wrote:
> Can somebody elaborate a bit on what "improve scanning" means here?

I believe it is so it can skip scanning stuff like ubyte[] for pointers and in the future might be used for precise scanning on structs with pointers and data combined.
October 27, 2017
On 10/27/17 10:18 AM, Nordlöw wrote:
> The docs for the third argument to
> 
> https://dlang.org/library/core/memory/gc.add_range.html
> 
> says:
> 
> "The GC might use this information to improve scanning for pointers or to call finalizers."
> 
> Can somebody elaborate a bit on what "improve scanning" means here?

Currently, the TypeInfo is needed if you want to call the destructor of a struct.

Eventually, if we ever have precise scanning, the TypeInfo may provide a way to only scan reference types within the block, eliminating sources of false pointers.

-Steve