mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
Fixed leaks in SearchMan. Default directories are now added with the 'autoFree' parameter set to true.
svn-id: r34926
This commit is contained in:
parent
5bf81acb95
commit
203db86869
@ -290,7 +290,7 @@ void OSystem_SDL::addSysArchivesToSearchSet(Common::SearchSet &s, int priority)
|
||||
// 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 @@ void OSystem_SDL::addSysArchivesToSearchSet(Common::SearchSet &s, int priority)
|
||||
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);
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ void SearchManager::addDirectory(const String &name, const FSNode &dir, int prio
|
||||
if (!dir.exists() || !dir.isDirectory())
|
||||
return;
|
||||
|
||||
add(name, new FSDirectory(dir, depth), priority);
|
||||
add(name, new FSDirectory(dir, depth), priority, true);
|
||||
}
|
||||
|
||||
void SearchManager::clear() {
|
||||
|
Loading…
Reference in New Issue
Block a user