Memory leak in zlib with void[]
Ald Sannes
aldarri_s at yahoo.com
Fri Nov 9 05:51:45 PST 2007
Hello.
I have the following code:
int zipFileSize = getSize(fileName);
void[] zipFileContent = uncompress(read(fileName), 0, 24);
delete zipFileContent;
return cast (char []) zipFileContent;
I am unzipping some 50 Mbytes of data, and some 50 Mbytes are not being freed.
The delete statement was added to check for memory leaks, and it is there to check is memory leak.
The program does nothing else (commented out).
Where to free the memory?
More information about the Digitalmars-d-learn
mailing list