1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00

Fix tiny memory leak on opening/closing new game window

Find this one when tested huge pack of 5000+ maps. Each time I opened/closed Single Scenario window memory usage was growing for ~1MB.
It's happen because inflateEnd is freed related structures, but not freed inflateState that created outside of zlib code.
This commit is contained in:
ArseniyShestakov 2015-02-07 17:30:57 +03:00
parent 96d57fc954
commit 4eed1716d5

View File

@ -103,7 +103,7 @@ CCompressedStream::CCompressedStream(std::unique_ptr<CInputStream> stream, bool
CCompressedStream::~CCompressedStream()
{
inflateEnd(inflateState);
//delete inflateState;
delete inflateState;
}
si64 CCompressedStream::readMore(ui8 *data, si64 size)