November 12, 2021 [Issue 22505] Array relocation causes multiple calls to destructor | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22505 --- Comment #1 from omerfirmak@gmail.com --- Previous sample code was missing some parts; -------------------- import std; import core.memory; struct B { int[] b; ~this () { b[0]++; writeln(b[0]); } @disable this(this); this (ref B rhs) @trusted nothrow pure { this.b = rhs.b.dup; } } void main() { B[] b_list; foreach(idx; 0 ..100) b_list ~= B([0]); b_list.length = 0; GC.collect(); } -- |
December 17, 2022 [Issue 22505] Array relocation causes multiple calls to destructor | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=22505 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P2 -- |
Copyright © 1999-2021 by the D Language Foundation