[Issue 2306] Scope for dynamic arrays should free memory.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 11 04:25:51 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2306
------- Comment #5 from maxmo at pochta.ru 2008-12-11 06:25 -------
(In reply to comment #0)
> void test() {
> scope uint[] foo = new uint[100_000_000];
> }
> void test() {
> uint[] foo = new uint[100_000_000];
> scope(exit) delete foo;
> }
>
> This isn't a very serious bug, since there's an obvious, simple workaround, but
> it's still an inconsistency in the language design, and ideally should be
> fixed.
>
consider this
-----
void test() {
scope uint[] foo = new uint[100_000_000];
scope uint[] foo1 = foo;
}
-----
how much should it free?
--
More information about the Digitalmars-d-bugs
mailing list