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/Region/Framework/Scenes/Scene.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ee848bb..a3bc04b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1223,10 +1223,7 @@ namespace OpenSim.Region.Framework.Scenes if (!m_backingup) { m_backingup = true; - - System.ComponentModel.BackgroundWorker backupWorker = new System.ComponentModel.BackgroundWorker(); - backupWorker.DoWork += delegate(object sender, System.ComponentModel.DoWorkEventArgs e) { Backup(); }; - backupWorker.RunWorkerAsync(); + Util.FireAndForget(BackupWaitCallback); } } @@ -1239,6 +1236,14 @@ namespace OpenSim.Region.Framework.Scenes } /// + /// Wrapper for Backup() that can be called with Util.FireAndForget() + /// + private void BackupWaitCallback(object o) + { + Backup(); + } + + /// /// Backup the scene. This acts as the main method of the backup thread. /// /// -- cgit v1.1