On 9/5/22 7:12 AM, frame wrote:
And what if the programmer has no actual reference but wrongly forced a `free()` through a pointer cast?
https://dlang.org/spec/garbage.html#pointers_and_gc* Do not store pointers into non-pointer variables using casts and other tricks.
```d void* p; ... int x = cast(int)p; // error: undefined behavior ``` The garbage collector does not scan non-pointer fields for GC pointers. Note that this does not require the forked GC to cause this problem. -Steve