[Issue 2306] Scope for dynamic arrays should free memory.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 11 20:54:31 PST 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2306





------- Comment #6 from dsimcha at yahoo.com  2008-12-11 22:54 -------
(In reply to comment #5)
> 
> consider this
> -----
> void test() {
>     scope uint[] foo = new uint[100_000_000];
>     scope uint[] foo1 = foo;
> }
> -----
> how much should it free?
> 

I guess this is where the T[new] and T[] types that have been proposed come in.
 foo would be T[new] so it would determine the freeing stuff. foo1 would be
T[], so it wouldn't.


-- 



More information about the Digitalmars-d-bugs mailing list