From f6af7cdcc7530149bf976cb69a2aa7aab21abb84 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Sun, 29 Aug 2004 19:08:08 +0000 Subject: Provide unloading of unneeded plugins. svn-id: r14829 --- base/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'base/main.cpp') diff --git a/base/main.cpp b/base/main.cpp index 749d62a5fa..68ca73a4be 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -381,8 +381,14 @@ extern "C" int scummvm_main(GameDetector &detector, int argc, char *argv[]) { //while(1) { // Verify the given game name is a valid supported game if (detector.detectMain()) { + // Unload all plugins not needed for this game, + // to save memory + PluginManager::instance().unloadPluginsExcept(detector._plugin); + runGame(detector, system); + // PluginManager::instance().unloadPlugins(); + // PluginManager::instance().loadPlugins(); // launcherDialog(detector, system); } //} -- cgit v1.2.3