1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:53:52 +00:00

fix 2 leaks

This commit is contained in:
scrawl 2012-12-10 00:59:39 +01:00
parent 5f5addf052
commit e3dd3d565c
2 changed files with 15 additions and 0 deletions

View file

@ -313,7 +313,12 @@ void FFmpeg_Decoder::close()
mStreams.erase(mStreams.begin());
}
if(mFormatCtx)
{
AVIOContext* context = mFormatCtx->pb;
av_free(context);
mFormatCtx->pb = NULL;
av_close_input_file(mFormatCtx);
}
mFormatCtx = NULL;
mDataStream.setNull();

View file

@ -287,6 +287,16 @@ namespace MWWorld
public:
typedef SharedIterator<ESM::Land> iterator;
virtual ~Store<ESM::Land>()
{
for (std::vector<ESM::Land *>::const_iterator it =
mStatic.begin(); it != mStatic.end(); ++it)
{
delete *it;
}
}
int getSize() const {
return mStatic.size();
}