Static arrays / File imports cause memory leaks

BCS none at anon.com
Wed Jan 13 15:04:57 PST 2010


Hello bobef,

> I can't reproduce this but I think it worths mentioning. I just
> finished debugging a memory leak. It turned out to be compiler problem
> (dmd 1.035 windows). I had two big static arrays in a class member
> function (around 200kb each) and using my app as usual was causing
> huge memory leaks. Replacing these with dynamic arrays solved it.
> 

Sounds like a static array is getting incorrectly marked as containing pointers. 
I think it would be valid to say that the data from an import(filename) NEVER 
contains pointers. 




More information about the Digitalmars-d-bugs mailing list