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

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Fri Nov 7 12:09:16 CET 2008


Revision: 34926
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34926&view=rev
Author:   peres001
Date:     2008-11-07 11:09:16 +0000 (Fri, 07 Nov 2008)

Log Message:
-----------
Fixed leaks in SearchMan. Default directories are now added with the 'autoFree' parameter set to true.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/sdl/sdl.cpp
    scummvm/trunk/common/archive.cpp

Modified: scummvm/trunk/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/sdl.cpp	2008-11-07 10:14:57 UTC (rev 34925)
+++ scummvm/trunk/backends/platform/sdl/sdl.cpp	2008-11-07 11:09:16 UTC (rev 34926)
@@ -290,7 +290,7 @@
 	// FIXME: We use depth = 4 for now, to match the old code. May want to change that
 	Common::FSNode dataNode(DATA_PATH);
 	if (dataNode.exists() && dataNode.isDirectory()) {
-		s.add(DATA_PATH, new Common::FSDirectory(dataNode, 4), priority);
+		s.add(DATA_PATH, new Common::FSDirectory(dataNode, 4), priority, true);
 	}
 #endif
 
@@ -303,7 +303,7 @@
 		if (CFURLGetFileSystemRepresentation(fileUrl, true, buf, sizeof(buf))) {
 			// Success: Add it to the search path
 			Common::String bundlePath((const char *)buf);
-			s.add("__OSX_BUNDLE__", new Common::FSDirectory(bundlePath), priority);
+			s.add("__OSX_BUNDLE__", new Common::FSDirectory(bundlePath), priority, true);
 		}
 		CFRelease(fileUrl);
 	}

Modified: scummvm/trunk/common/archive.cpp
===================================================================
--- scummvm/trunk/common/archive.cpp	2008-11-07 10:14:57 UTC (rev 34925)
+++ scummvm/trunk/common/archive.cpp	2008-11-07 11:09:16 UTC (rev 34926)
@@ -431,7 +431,7 @@
 	if (!dir.exists() || !dir.isDirectory())
 		return;
 
-	add(name, new FSDirectory(dir, depth), priority);
+	add(name, new FSDirectory(dir, depth), priority, true);
 }
 
 void SearchManager::clear() {


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