aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2016-09-07 18:29:23 +0200
committerEugene Sandulenko2016-09-07 18:29:23 +0200
commit8f8e94bde650c71fdbc5a642c048b02c246a9f28 (patch)
tree0dc8b0a6af7ca5e96eee561f5fb9353395e3bb91 /engines/fullpipe
parenta021b4c7e8c811f56c522e69f1723d29d7c36cc7 (diff)
downloadscummvm-rg350-8f8e94bde650c71fdbc5a642c048b02c246a9f28.tar.gz
scummvm-rg350-8f8e94bde650c71fdbc5a642c048b02c246a9f28.tar.bz2
scummvm-rg350-8f8e94bde650c71fdbc5a642c048b02c246a9f28.zip
FULLPIPE: Fix memory leak in scene09
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/scenes/scene09.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index fe9051e540..209cf183b3 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -71,7 +71,11 @@ void scene09_initScene(Scene *sc) {
g_vars->scene09_flyingBalls.clear();
+ for (uint i = 0; i < g_vars->scene09_hangers.size(); i++)
+ delete g_vars->scene09_hangers[i];
+
g_vars->scene09_hangers.clear();
+
g_vars->scene09_numMovingHangers = 4;
StaticANIObject *hanger = sc->getStaticANIObject1ById(ANI_VISUNCHIK, -1);
@@ -102,6 +106,9 @@ void scene09_initScene(Scene *sc) {
g_vars->scene09_hangers.push_back(hng);
}
+ for (uint i = 0; i < g_vars->scene09_sceneBalls.size(); i++)
+ delete g_vars->scene09_sceneBalls[i];
+
g_vars->scene09_sceneBalls.clear();
StaticANIObject *newball = new StaticANIObject(sc->getStaticANIObject1ById(ANI_BALL9, -1));