diff options
author | Nipun Garg | 2019-07-18 21:13:10 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:23 +0200 |
commit | ae1f4efeb58d195acde7185fa4f71100449966be (patch) | |
tree | b3bdfc1d6337b303f5d85552773e0044cd6782fe | |
parent | 62a33b13991c87bf2c513ff1920231134f68224c (diff) | |
download | scummvm-rg350-ae1f4efeb58d195acde7185fa4f71100449966be.tar.gz scummvm-rg350-ae1f4efeb58d195acde7185fa4f71100449966be.tar.bz2 scummvm-rg350-ae1f4efeb58d195acde7185fa4f71100449966be.zip |
HDB: Fix memory leaks in Menu
-rw-r--r-- | engines/hdb/menu.cpp | 15 | ||||
-rw-r--r-- | engines/hdb/window.cpp | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp index ffcf673723..8d82283623 100644 --- a/engines/hdb/menu.cpp +++ b/engines/hdb/menu.cpp @@ -27,6 +27,21 @@ namespace HDB { Menu::~Menu() { freeMenu(); + + delete _gCheckEmpty; + delete _gCheckOff; + delete _gCheckOn; + delete _gCheckLeft; + delete _gCheckRight; + + delete _contArrowUp; + delete _contArrowDown; + delete _contArrowLeft; + delete _contArrowRight; + delete _contAssign; + + delete _warpPlaque; + delete _hdbLogoScreen; } bool Menu::init() { diff --git a/engines/hdb/window.cpp b/engines/hdb/window.cpp index b3e4b1963b..28faa21025 100644 --- a/engines/hdb/window.cpp +++ b/engines/hdb/window.cpp @@ -418,6 +418,8 @@ void Window::restartSystem() { _dialogChoiceInfo.active = false; _invWinInfo.active = false; _dialogDelay = _invWinInfo.selection = 0; + if (_gemGfx) + delete _gemGfx; _gemGfx = g_hdb->_gfx->loadTile(GEM_WHITE_GFX); _infobarDimmed = 0; } |