On Tuesday, 24 May 2016 at 13:48:41 UTC, Nick Treleaven wrote:
What about:@safe unittest { RCArray!int arr; ref r = arr[0]; arr.destroy; // refcount drops to zero, arr.impl memory freed r++; // writes to unallocated memory }
You're calling `destroy` explicitly, what else would you expect to happen?