From a41cd1d0695c01e4096fa0b7696b415a4c7455fc Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 23 Oct 2009 13:14:29 -0700 Subject: * 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 object every round of the OutgoingPacketHandler * Removed unnecessary semi-colon endings from OpenSim.ini.example [InterestManagement] section --- OpenSim/Data/DataPluginFactory.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/DataPluginFactory.cs b/OpenSim/Data/DataPluginFactory.cs index 718c6b2..841f71e 100644 --- a/OpenSim/Data/DataPluginFactory.cs +++ b/OpenSim/Data/DataPluginFactory.cs @@ -119,14 +119,15 @@ namespace OpenSim.Data PluginLoaderParamFactory(connect, out pluginInitialiser, out extensionPointPath); - PluginLoader loader = new PluginLoader(pluginInitialiser); - - // loader will try to load all providers (MySQL, MSSQL, etc) - // unless it is constrainted to the correct "Provider" entry in the addin.xml - loader.Add(extensionPointPath, new PluginProviderFilter(provider)); - loader.Load(); + using (PluginLoader loader = new PluginLoader(pluginInitialiser)) + { + // loader will try to load all providers (MySQL, MSSQL, etc) + // unless it is constrainted to the correct "Provider" entry in the addin.xml + loader.Add(extensionPointPath, new PluginProviderFilter(provider)); + loader.Load(); - return loader.Plugins; + return loader.Plugins; + } } /// -- cgit v1.1