diff options
author | David Turner | 2011-01-29 18:18:29 +0000 |
---|---|---|
committer | David Turner | 2011-01-29 18:18:29 +0000 |
commit | f050e2d66fd384c2d102152aa9371474b08e8664 (patch) | |
tree | 45ad475bc8ccb9ad2ce16606b354ea877660d15a | |
parent | 83866978be7c7b3db33c28cdf04a0201f0df1432 (diff) | |
download | scummvm-rg350-f050e2d66fd384c2d102152aa9371474b08e8664.tar.gz scummvm-rg350-f050e2d66fd384c2d102152aa9371474b08e8664.tar.bz2 scummvm-rg350-f050e2d66fd384c2d102152aa9371474b08e8664.zip |
KYRA: Close Memory Leaks in Kyra 3 (Malcolm's Revenge) Menu.
svn-id: r55618
-rw-r--r-- | engines/kyra/kyra_mr.cpp | 4 | ||||
-rw-r--r-- | engines/kyra/kyra_v2.cpp | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 5ac6da9f2b..b91eb42b47 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -121,6 +121,7 @@ KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngi _curDlgChapter = _curDlgIndex = _curDlgLang = -1; _isStartupDialog = 0; _stringBuffer = 0; + _menuAnim = 0; _dialogSceneAnim = _dialogSceneScript = -1; memset(&_dialogScriptData, 0, sizeof(_dialogScriptData)); memset(&_dialogScriptState, 0, sizeof(_dialogScriptState)); @@ -155,6 +156,9 @@ KyraEngine_MR::~KyraEngine_MR() { delete _screen; delete _soundDigital; + delete _menuAnim; + _menuAnim = 0; + delete[] _itemBuffer1; delete[] _itemBuffer2; delete[] _scoreFile; diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 53c57c21cd..27c89ff9a3 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -74,6 +74,8 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const Engi _pauseStart = 0; + _menu = 0; + _lang = 0; Common::Language lang = Common::parseLanguage(ConfMan.get("language")); if (lang == _flags.fanLang && _flags.replacedLang != Common::UNK_LANG) @@ -118,6 +120,9 @@ KyraEngine_v2::~KyraEngine_v2() { _emc->unload(&_sceneScriptData); + delete _menu; + _menu = 0; + delete[] _animObjects; for (Common::Array<const Opcode*>::iterator i = _opcodesAnimation.begin(); i != _opcodesAnimation.end(); ++i) |