[Issue 13642] std.container.Array: change of length reallocates without notifying GC
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Oct 21 01:37:29 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13642
safety0ff.bugz <safety0ff.bugz at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |safety0ff.bugz at gmail.com
--- Comment #1 from safety0ff.bugz <safety0ff.bugz at gmail.com> ---
Right, the realloc in length(size_t) should be replaced with similar code to
reserve, i.e.:
static if (hasIndirections!T)
// use malloc/copy/free along with GC.addRange & GC.removeRange
else
// use realloc
--
More information about the Digitalmars-d-bugs
mailing list