[Scummvm-cvs-logs] scummvm master -> fa2d8d927b353162ac9ee434b4611e03b22246e8

bluegr bluegr at gmail.com
Wed Dec 24 22:28:04 CET 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fa2d8d927b ZVISION: Plug more memory leaks


Commit: fa2d8d927b353162ac9ee434b4611e03b22246e8
    https://github.com/scummvm/scummvm/commit/fa2d8d927b353162ac9ee434b4611e03b22246e8
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2014-12-24T23:27:03+02:00

Commit Message:
ZVISION: Plug more memory leaks

Changed paths:
    engines/zvision/scripting/controls/paint_control.cpp
    engines/zvision/scripting/controls/titler_control.cpp



diff --git a/engines/zvision/scripting/controls/paint_control.cpp b/engines/zvision/scripting/controls/paint_control.cpp
index df06bb8..62dde3d 100644
--- a/engines/zvision/scripting/controls/paint_control.cpp
+++ b/engines/zvision/scripting/controls/paint_control.cpp
@@ -114,12 +114,18 @@ PaintControl::PaintControl(ZVision *engine, uint32 key, Common::SeekableReadStre
 PaintControl::~PaintControl() {
 	// Clear the state value back to 0
 	//_engine->getScriptManager()->setStateValue(_key, 0);
-	if (_paint)
+	if (_paint) {
+		_paint->free();
 		delete _paint;
-	if (_brush)
+	}
+	if (_brush) {
+		_brush->free();
 		delete _brush;
-	if (_bkg)
+	}
+	if (_bkg) {
+		_bkg->free();
 		delete _bkg;
+	}
 }
 
 bool PaintControl::onMouseUp(const Common::Point &screenSpacePos, const Common::Point &backgroundImageSpacePos) {
diff --git a/engines/zvision/scripting/controls/titler_control.cpp b/engines/zvision/scripting/controls/titler_control.cpp
index d6b1d34..542e0a0 100644
--- a/engines/zvision/scripting/controls/titler_control.cpp
+++ b/engines/zvision/scripting/controls/titler_control.cpp
@@ -73,8 +73,10 @@ TitlerControl::TitlerControl(ZVision *engine, uint32 key, Common::SeekableReadSt
 }
 
 TitlerControl::~TitlerControl() {
-	if (_surface)
+	if (_surface) {
+		_surface->free();
 		delete _surface;
+	}
 }
 
 void TitlerControl::setString(int strLine) {






More information about the Scummvm-git-logs mailing list