diff options
author | Eugene Sandulenko | 2016-12-12 22:49:40 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-12-12 22:49:40 +0100 |
commit | 483fff04f67cd48a74ca3f90c87649d4f38649aa (patch) | |
tree | c1725ca3b1a7ad1be1cd37293435cef66573cb83 | |
parent | 64a1c2f867138106c1226865fe8f6c595fe5ef1d (diff) | |
download | scummvm-rg350-483fff04f67cd48a74ca3f90c87649d4f38649aa.tar.gz scummvm-rg350-483fff04f67cd48a74ca3f90c87649d4f38649aa.tar.bz2 scummvm-rg350-483fff04f67cd48a74ca3f90c87649d4f38649aa.zip |
FULLPIPE: Plug more memory leaks
-rw-r--r-- | engines/fullpipe/gfx.cpp | 3 | ||||
-rw-r--r-- | engines/fullpipe/statesaver.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index e46ab93e14..145f4e87b1 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -45,6 +45,9 @@ Background::Background() { } Background::~Background() { + for (uint i = 1; i < _picObjList.size(); i++) + delete _picObjList[i]; + _picObjList.clear(); for (int i = 0; i < _bigPictureArray1Count; i++) { diff --git a/engines/fullpipe/statesaver.cpp b/engines/fullpipe/statesaver.cpp index 7fb56f0479..5eb08fe213 100644 --- a/engines/fullpipe/statesaver.cpp +++ b/engines/fullpipe/statesaver.cpp @@ -55,7 +55,7 @@ bool GameLoader::writeSavegame(Scene *sc, const char *fname) { header.updateCounter = _updateCounter; header.unkField = 1; - Common::MemoryWriteStreamDynamic stream; + Common::MemoryWriteStreamDynamic stream(DisposeAfterUse::YES); MfcArchive *archive = new MfcArchive(&stream); |