aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/PluginLoader.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-23 13:14:29 -0700
committerJohn Hurliman2009-10-23 13:14:29 -0700
commita41cd1d0695c01e4096fa0b7696b415a4c7455fc (patch)
treea942c2f79906a7de36e3fe363fba2f8130e9f8c3 /OpenSim/Framework/PluginLoader.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-a41cd1d0695c01e4096fa0b7696b415a4c7455fc.zip
opensim-SC_OLD-a41cd1d0695c01e4096fa0b7696b415a4c7455fc.tar.gz
opensim-SC_OLD-a41cd1d0695c01e4096fa0b7696b415a4c7455fc.tar.bz2
opensim-SC_OLD-a41cd1d0695c01e4096fa0b7696b415a4c7455fc.tar.xz
* Unregister Mono.Addins event handlers in PluginLoader.Dispose() and always handle PluginLoader with the using pattern. This freed up 121,634,796 bytes on my system
* Avoid allocating an Action<IClientAPI> object every round of the OutgoingPacketHandler * Removed unnecessary semi-colon endings from OpenSim.ini.example [InterestManagement] section
Diffstat (limited to 'OpenSim/Framework/PluginLoader.cs')
-rw-r--r--OpenSim/Framework/PluginLoader.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Framework/PluginLoader.cs b/OpenSim/Framework/PluginLoader.cs
index 5d38f5f..819cb7b 100644
--- a/OpenSim/Framework/PluginLoader.cs
+++ b/OpenSim/Framework/PluginLoader.cs
@@ -194,10 +194,15 @@ namespace OpenSim.Framework
194 } 194 }
195 } 195 }
196 196
197 /// <summary>
198 /// Unregisters Mono.Addins event handlers, allowing temporary Mono.Addins
199 /// data to be garbage collected. Since the plugins created by this loader
200 /// are meant to outlive the loader itself, they must be disposed separately
201 /// </summary>
197 public void Dispose() 202 public void Dispose()
198 { 203 {
199 foreach (T plugin in Plugins) 204 AddinManager.AddinLoadError -= on_addinloaderror_;
200 plugin.Dispose(); 205 AddinManager.AddinLoaded -= on_addinloaded_;
201 } 206 }
202 207
203 private void initialise_plugin_dir_(string dir) 208 private void initialise_plugin_dir_(string dir)