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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user