mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 11:53:51 +00:00
fix 2 leaks
This commit is contained in:
parent
5f5addf052
commit
e3dd3d565c
2 changed files with 15 additions and 0 deletions
|
@ -313,7 +313,12 @@ void FFmpeg_Decoder::close()
|
||||||
mStreams.erase(mStreams.begin());
|
mStreams.erase(mStreams.begin());
|
||||||
}
|
}
|
||||||
if(mFormatCtx)
|
if(mFormatCtx)
|
||||||
|
{
|
||||||
|
AVIOContext* context = mFormatCtx->pb;
|
||||||
|
av_free(context);
|
||||||
|
mFormatCtx->pb = NULL;
|
||||||
av_close_input_file(mFormatCtx);
|
av_close_input_file(mFormatCtx);
|
||||||
|
}
|
||||||
mFormatCtx = NULL;
|
mFormatCtx = NULL;
|
||||||
|
|
||||||
mDataStream.setNull();
|
mDataStream.setNull();
|
||||||
|
|
|
@ -287,6 +287,16 @@ namespace MWWorld
|
||||||
public:
|
public:
|
||||||
typedef SharedIterator<ESM::Land> iterator;
|
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 {
|
int getSize() const {
|
||||||
return mStatic.size();
|
return mStatic.size();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue