https://issues.dlang.org/show_bug.cgi?id=15009
--- Comment #1 from Kenji Hara <[email protected]> --- The bug in Object.destroy overload for the static array is, that is using block assignment. void destroy(T : U[n], U, size_t n)(ref T obj) if (!is(T == struct)) { obj[] = U.init; } obj[] = U.init; _copies_ the rhs for each elements of lhs, and destroys the original elements of lhs. Instead of that, it should just destroy the elements. And, the order of destroying should occur from the last to the first. Then' the fixed destroy function should be: void destroy(T : U[n], U, size_t n)(ref T obj) if (!is(T == struct)) { foreach_reverse (ref e; obj[]) e = U.init; } --
