[Scummvm-cvs-logs] SF.net SVN: scummvm: [31261] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Mar 27 12:06:29 CET 2008


Revision: 31261
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31261&view=rev
Author:   fingolfin
Date:     2008-03-27 04:06:29 -0700 (Thu, 27 Mar 2008)

Log Message:
-----------
Patch #1926787: small memory leak and cleanup

Modified Paths:
--------------
    scummvm/trunk/base/main.cpp
    scummvm/trunk/graphics/font.cpp
    scummvm/trunk/graphics/scaler.cpp
    scummvm/trunk/gui/newgui.cpp
    scummvm/trunk/gui/newgui.h

Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2008-03-27 01:01:52 UTC (rev 31260)
+++ scummvm/trunk/base/main.cpp	2008-03-27 11:06:29 UTC (rev 31261)
@@ -332,7 +332,7 @@
 	PluginManager::instance().unloadPluginsExcept(NULL);
 	PluginManager::instance().destroy();
 	ConfMan.destroy();
-	delete g_gui.theme();
+	g_gui.destroy();
 
 	return 0;
 }

Modified: scummvm/trunk/graphics/font.cpp
===================================================================
--- scummvm/trunk/graphics/font.cpp	2008-03-27 01:01:52 UTC (rev 31260)
+++ scummvm/trunk/graphics/font.cpp	2008-03-27 11:06:29 UTC (rev 31261)
@@ -161,6 +161,7 @@
 	free(pf->bits);
 	free(pf->offset);
 	free(pf->width);
+	free(pf->bbx);
 	free(pf);
 }
 

Modified: scummvm/trunk/graphics/scaler.cpp
===================================================================
--- scummvm/trunk/graphics/scaler.cpp	2008-03-27 01:01:52 UTC (rev 31260)
+++ scummvm/trunk/graphics/scaler.cpp	2008-03-27 11:06:29 UTC (rev 31261)
@@ -112,10 +112,12 @@
 }
 
 void DestroyScalers(){
+#ifndef DISABLE_HQ_SCALERS
 	free(RGBtoYUV);
 	free(LUT16to32);
 	RGBtoYUV = 0;
 	LUT16to32 = 0;
+#endif
 }
 
 

Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp	2008-03-27 01:01:52 UTC (rev 31260)
+++ scummvm/trunk/gui/newgui.cpp	2008-03-27 11:06:29 UTC (rev 31261)
@@ -121,6 +121,10 @@
 	_themeChange = false;
 }
 
+NewGui::~NewGui() {
+	delete _theme;
+}
+
 bool NewGui::loadNewTheme(const Common::String &style) {
 	Common::String styleType;
 	Common::ConfigFile cfg;

Modified: scummvm/trunk/gui/newgui.h
===================================================================
--- scummvm/trunk/gui/newgui.h	2008-03-27 01:01:52 UTC (rev 31260)
+++ scummvm/trunk/gui/newgui.h	2008-03-27 11:06:29 UTC (rev 31261)
@@ -66,6 +66,7 @@
 	friend class Dialog;
 	friend class Common::Singleton<SingletonBaseType>;
 	NewGui();
+	~NewGui();
 public:
 
 	// Main entry for the GUI: this will start an event loop that keeps running


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list