digitalmars.D.learn - Role of third argument to GC.addRange
- =?UTF-8?B?Tm9yZGzDtnc=?= (7/7) Oct 27 2017 The docs for the third argument to
- Adam D. Ruppe (4/6) Oct 27 2017 I believe it is so it can skip scanning stuff like ubyte[] for
- Steven Schveighoffer (7/17) Oct 27 2017 Currently, the TypeInfo is needed if you want to call the destructor of
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?
Oct 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.
Oct 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
Oct 27 2017