Garbage collector doesn't collect?

n00b n00b at nospam.com
Tue Jan 29 07:42:46 PST 2013


If I do the following... :

foreach(string foo ; bigFilesList)
{
	string file = cast(string)std.file.read(foo);
}

...I run out of memory because the garbage collector apparently does not 
free previously loaded files, even though there isn't any reference left 
to them. ( I'm using D2.59, later versions do not seem to work with 
visualD )
Is it a bug?


More information about the Digitalmars-d-learn mailing list