diff options
author | richiesams | 2013-08-05 12:50:40 -0500 |
---|---|---|
committer | richiesams | 2013-08-05 12:51:07 -0500 |
commit | 9bea3cb1c274d2a003ed4e80004fe2a8dc04373f (patch) | |
tree | cdc3c36ee3c703e6ceaa69a3fc66c0ea95bbb955 | |
parent | f2823933b4017fcd51eaa96ffb5dd608fcaacf4f (diff) | |
download | scummvm-rg350-9bea3cb1c274d2a003ed4e80004fe2a8dc04373f.tar.gz scummvm-rg350-9bea3cb1c274d2a003ed4e80004fe2a8dc04373f.tar.bz2 scummvm-rg350-9bea3cb1c274d2a003ed4e80004fe2a8dc04373f.zip |
ZVISION: Add memory cleanup for _currentBackground
-rw-r--r-- | engines/zvision/render_manager.cpp | 6 | ||||
-rw-r--r-- | engines/zvision/render_manager.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/engines/zvision/render_manager.cpp b/engines/zvision/render_manager.cpp index b38db003d1..70f67deab7 100644 --- a/engines/zvision/render_manager.cpp +++ b/engines/zvision/render_manager.cpp @@ -43,6 +43,12 @@ RenderManager::RenderManager(OSystem *system, const int width, const int height) _renderTable(width, height) { } +RenderManager::~RenderManager() { + if (_currentBackground != 0) { + delete _currentBackground; + } +} + void RenderManager::updateScreen(bool isConsoleActive) { if (_needsScreenUpdate || isConsoleActive) { _system->updateScreen(); diff --git a/engines/zvision/render_manager.h b/engines/zvision/render_manager.h index 9554e888d9..c4318f7dd3 100644 --- a/engines/zvision/render_manager.h +++ b/engines/zvision/render_manager.h @@ -44,6 +44,7 @@ namespace ZVision { class RenderManager { public: RenderManager(OSystem *system, const int width, const int height); + ~RenderManager(); private: OSystem *_system; |