fix 2 leaks

actorid
scrawl 12 years ago
parent 5f5addf052
commit e3dd3d565c

@ -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…
Cancel
Save