[Issue 14134] Free of large array does not work
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Feb 12 05:24:57 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14134
--- Comment #11 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Martin Nowak from comment #9)
> (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.
I agree.
>
> > There is no good way to destroy an array except delete.
>
> foreach (ref el; ary)
> destroy(el);
Some type of destroyRange would be a good addition (not just for arrays).
Regardless of this, we need to support a way to manually manage array memory.
Especially large arrays, that is where the problem of the conservative GC
really shows up.
--
More information about the Digitalmars-d-bugs
mailing list