[Issue 14134] Free of large array does not work

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Feb 11 10:10:31 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14134

Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code at dawg.eu

--- Comment #9 from Martin Nowak <code at dawg.eu> ---
(In reply to Rainer Schuetze from comment #8)
> Other notes:
> 
> - The current version also "works" for memory allocated outside the GC, it
> just doesn't free the memory.

That should be fixed, we don't want to promote delete arr[] as a method to
destroy a slice.

> There is no good way to destroy an array except delete.

foreach (ref el; ary)
    destroy(el);

--


More information about the Digitalmars-d-bugs mailing list