aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/motion.cpp
diff options
context:
space:
mode:
authorColin Snover2017-11-16 22:30:25 -0600
committerEugene Sandulenko2017-11-18 22:35:12 +0100
commitcef4d7787748fe8f0fae45d2573da4dfd4cc1c85 (patch)
tree1357d1a6175727c98ddac4c04337b40941096cdf /engines/fullpipe/motion.cpp
parentc7b1f6b26c0276f0d9dafb8c4ec4daac268d26c6 (diff)
downloadscummvm-rg350-cef4d7787748fe8f0fae45d2573da4dfd4cc1c85.tar.gz
scummvm-rg350-cef4d7787748fe8f0fae45d2573da4dfd4cc1c85.tar.bz2
scummvm-rg350-cef4d7787748fe8f0fae45d2573da4dfd4cc1c85.zip
FULLPIPE: Fix memory leaks of MctlItems in MctlCompound
Diffstat (limited to 'engines/fullpipe/motion.cpp')
-rw-r--r--engines/fullpipe/motion.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 7c46d1756c..a6c55bfd40 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -105,6 +105,10 @@ MovGraphLink *MotionController::getLinkByName(const char *name) {
return 0;
}
+MctlCompound::~MctlCompound() {
+ Common::for_each(_motionControllers.begin(), _motionControllers.end(), Common::DefaultDeleter<MctlItem>());
+}
+
bool MctlCompound::load(MfcArchive &file) {
debugC(5, kDebugLoading, "MctlCompound::load()");
@@ -731,18 +735,6 @@ MctlItem::~MctlItem() {
Common::for_each(_connectionPoints.begin(), _connectionPoints.end(), Common::DefaultDeleter<MctlConnectionPoint>());
}
-bool MctlCompoundArray::load(MfcArchive &file) {
- debugC(5, kDebugLoading, "MctlCompoundArray::load()");
-
- int count = file.readUint32LE();
-
- debugC(0, kDebugLoading, "MctlCompoundArray::count = %d", count);
-
- assert(0);
-
- return true;
-}
-
MovGraphItem::MovGraphItem() {
ani = 0;
field_4 = 0;