[Scummvm-git-logs] scummvm master -> ae7147c6c4918f719df4e343970501375eb58694
sev-
sev at scummvm.org
Mon Dec 12 23:39:12 CET 2016
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c5e55878ad FULLPIPE: Plug more memory leaks
ae7147c6c4 FULLPIPE: Fix warning
Commit: c5e55878ad68b26babcc5ca654cf39488df102ec
https://github.com/scummvm/scummvm/commit/c5e55878ad68b26babcc5ca654cf39488df102ec
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-12T23:35:32+01:00
Commit Message:
FULLPIPE: Plug more memory leaks
Changed paths:
engines/fullpipe/gameloader.cpp
engines/fullpipe/gameloader.h
engines/fullpipe/gfx.cpp
engines/fullpipe/motion.cpp
engines/fullpipe/motion.h
engines/fullpipe/statics.cpp
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index aebf73d..2d7dc31 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -617,6 +617,19 @@ Sc2::Sc2() {
_entranceDataCount = 0;
}
+Sc2::~Sc2() {
+ delete _motionController;
+ free(_data1);
+
+ for (int i = 0; i < _defPicAniInfosCount; i++)
+ delete _defPicAniInfos[i];
+ free(_defPicAniInfos);
+
+ for (int i = 0; i < _entranceDataCount; i++)
+ delete _entranceData[i];
+ free(_entranceData);
+}
+
bool Sc2::load(MfcArchive &file) {
debugC(5, kDebugLoading, "Sc2::load()");
diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h
index a6c2416..52811d8 100644
--- a/engines/fullpipe/gameloader.h
+++ b/engines/fullpipe/gameloader.h
@@ -57,6 +57,7 @@ class Sc2 : public CObject {
public:
Sc2();
+ virtual ~Sc2();
virtual bool load(MfcArchive &file);
};
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 466f123..0f9ac80 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -483,7 +483,7 @@ void Picture::freePicture() {
if (_bitmap) {
if (testFlags() && !_field_54) {
freeData();
- //free(_bitmap);
+ delete _bitmap;
_bitmap = 0;
}
}
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 05f13d4..13fe8d0 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -105,6 +105,11 @@ MovGraphLink *MotionController::getLinkByName(const char *name) {
return 0;
}
+MctlCompound::~MctlCompound() {
+ for (uint i = 0; i < _motionControllers.size(); i++)
+ delete _motionControllers[i];
+}
+
bool MctlCompound::load(MfcArchive &file) {
debugC(5, kDebugLoading, "MctlCompound::load()");
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 4eecd98..d1c5901 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -106,6 +106,7 @@ public:
MctlCompoundArray _motionControllers;
MctlCompound() { _objtype = kObjTypeMctlCompound; }
+ virtual ~MctlCompound();
virtual bool load(MfcArchive &file);
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 7f43fa0..cc94f54 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -154,6 +154,8 @@ StaticANIObject::~StaticANIObject() {
_staticsList.clear();
+ freeMovementsPixelData();
+
for (uint i = 0; i < _movements.size(); i++)
delete _movements[i];
Commit: ae7147c6c4918f719df4e343970501375eb58694
https://github.com/scummvm/scummvm/commit/ae7147c6c4918f719df4e343970501375eb58694
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-12-12T23:38:03+01:00
Commit Message:
FULLPIPE: Fix warning
Changed paths:
engines/fullpipe/input.cpp
diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp
index 55bc217..4bcc2ac 100644
--- a/engines/fullpipe/input.cpp
+++ b/engines/fullpipe/input.cpp
@@ -57,7 +57,7 @@ InputController::~InputController() {
g_fp->_inputController = 0;
- for (int i = 0; i < _cursorsArray.size(); i++)
+ for (uint i = 0; i < _cursorsArray.size(); i++)
delete _cursorsArray[i];
}
More information about the Scummvm-git-logs
mailing list