mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 22:58:09 +00:00
KYRA: Close Memory Leaks in Kyra 3 (Malcolm's Revenge) Menu.
svn-id: r55618
This commit is contained in:
parent
83866978be
commit
f050e2d66f
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user