Diff of /trunk/src/gx_head/engine/gx_pluginloader.cpp [240db3] .. [c0a1dc]  Maximize  Restore

  Switch to side-by-side view

--- a/trunk/src/gx_head/engine/gx_pluginloader.cpp
+++ b/trunk/src/gx_head/engine/gx_pluginloader.cpp
@@ -311,7 +311,7 @@
 
 PluginListBase::PluginListBase() : pmap() {}
 
-PluginListBase::~PluginListBase() {
+void PluginListBase::cleanup() {
     for (pluginmap::iterator p = pmap.begin(); p != pmap.end(); ++p) {
 	PluginDef *pdef = p->second->get_pdef();
 	if (!(pdef->flags & PGNI_NOT_OWN)) {
@@ -321,6 +321,11 @@
 	    delete p->second;
 	}
     }
+    pmap.clear();
+}
+
+PluginListBase::~PluginListBase() {
+    cleanup();
 }
 
 PluginList::PluginList(EngineControl& seq_)