1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

- fixed some evil memory leaks

- fixed recursive dependency of castles
This commit is contained in:
Ivan Savenko
2013-12-19 19:43:16 +00:00
parent 881a7cf862
commit 29f4a12814
13 changed files with 27 additions and 19 deletions

View File

@@ -102,7 +102,8 @@ CCompressedStream::CCompressedStream(std::unique_ptr<CInputStream> stream, bool
CCompressedStream::~CCompressedStream()
{
delete inflateState;
inflateEnd(inflateState);
//delete inflateState;
}
si64 CCompressedStream::readMore(ui8 *data, si64 size)
@@ -163,7 +164,7 @@ si64 CCompressedStream::readMore(ui8 *data, si64 size)
if (fileEnded)
{
inflateEnd(inflateState);
vstd::clear_pointer(inflateState);
//vstd::clear_pointer(inflateState);
}
return decompressed;
}