[Issue 14029] New: dynamic arrays dont free memory when they are gone..
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jan 22 06:24:24 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14029
Issue ID: 14029
Summary: dynamic arrays dont free memory when they are gone..
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: trivial
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: collerblade at gmail.com
Dead D users...
I have run into this problem, its very simple, but im wondering why it isnt
working. Code snipet:
import core.sys.windows.windows;
void main() {
real[] a;
while(true) {
a.length=4096*4096; //alloc a big chunk of mem
a=null;
Sleep(1000); //just wait a bit
}
}
This code runs out of memory. GC never collects anything. Is that a bug?
Im using DMD 2.066.1
I've tried GC.collect(), GC.minimize() too, but the result is the same.
TY: collerblade
--
More information about the Digitalmars-d-bugs
mailing list