aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorrichiesams2013-08-05 12:50:40 -0500
committerrichiesams2013-08-05 12:51:07 -0500
commit9bea3cb1c274d2a003ed4e80004fe2a8dc04373f (patch)
treecdc3c36ee3c703e6ceaa69a3fc66c0ea95bbb955 /engines
parentf2823933b4017fcd51eaa96ffb5dd608fcaacf4f (diff)
downloadscummvm-rg350-9bea3cb1c274d2a003ed4e80004fe2a8dc04373f.tar.gz
scummvm-rg350-9bea3cb1c274d2a003ed4e80004fe2a8dc04373f.tar.bz2
scummvm-rg350-9bea3cb1c274d2a003ed4e80004fe2a8dc04373f.zip
ZVISION: Add memory cleanup for _currentBackground
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/render_manager.cpp6
-rw-r--r--engines/zvision/render_manager.h1
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;