On Monday, 6 June 2022 at 22:24:45 UTC, Guillaume Piolat wrote:
My understanding is that while scanning, the GC will see the
data.ptr pointer, but will not scan the area it points to since
it's not in a GC range (the runtime can distinguish managed
pointer and other pointers).
After scanning, when obj is non-reachable, the GC will destroy
it but that won't lead to a reclaim of data.ptr since it knows
it doesn't own that.
In D, the ownership of slice is purely determined by the memory
area it points to.
If it points into GC memory then it's a GC slice.