aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorrichiesams2013-08-24 00:24:43 -0500
committerrichiesams2013-08-24 00:24:43 -0500
commitfc5727c522d4313ab1912a52898405d083c60363 (patch)
tree036cfae75de6350b7d76559387ab0a3547e50476 /engines/zvision
parent0ed7df9a3632207d65f3aef11d5f07e185484207 (diff)
downloadscummvm-rg350-fc5727c522d4313ab1912a52898405d083c60363.tar.gz
scummvm-rg350-fc5727c522d4313ab1912a52898405d083c60363.tar.bz2
scummvm-rg350-fc5727c522d4313ab1912a52898405d083c60363.zip
ZVISION: Fix memory leak
We no longer use SharedPtr
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/script_manager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp
index d671c6178c..bcede2060d 100644
--- a/engines/zvision/script_manager.cpp
+++ b/engines/zvision/script_manager.cpp
@@ -253,7 +253,9 @@ void ScriptManager::changeLocationIntern() {
delete (*iter);
}
_activePuzzles.clear();
- // We can clear without deleting from the heap because we use SharedPtr
+ for (Common::HashMap<uint32, Control *>::iterator iter = _activeControls.begin(); iter != _activeControls.end(); iter++) {
+ delete (*iter)._value;
+ }
_activeControls.clear();
_engine->clearAllMouseEvents();