On Friday, 23 October 2020 at 19:23:03 UTC, frame wrote: > So how can I avoid this issue with DMD? Disabling any > optimization? In fact it does not occur with debug mode enabled. > A dirty fix is to manually add the pointer as a GC root.