mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-27 21:49:10 +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:
parent
96d57fc954
commit
4eed1716d5
@ -103,7 +103,7 @@ CCompressedStream::CCompressedStream(std::unique_ptr<CInputStream> stream, bool
|
|||||||
CCompressedStream::~CCompressedStream()
|
CCompressedStream::~CCompressedStream()
|
||||||
{
|
{
|
||||||
inflateEnd(inflateState);
|
inflateEnd(inflateState);
|
||||||
//delete inflateState;
|
delete inflateState;
|
||||||
}
|
}
|
||||||
|
|
||||||
si64 CCompressedStream::readMore(ui8 *data, si64 size)
|
si64 CCompressedStream::readMore(ui8 *data, si64 size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user