mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Change the backup thread to run on a BackgroundWorker instead of a Thread. I don't have an explanation, but this seems to stop a slow but steady memory leak I was experiencing
This commit is contained in:
@@ -1186,10 +1186,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (!m_backingup)
|
||||
{
|
||||
m_backingup = true;
|
||||
Thread backupthread = new Thread(Backup);
|
||||
backupthread.Name = "BackupWriter";
|
||||
backupthread.IsBackground = true;
|
||||
backupthread.Start();
|
||||
|
||||
System.ComponentModel.BackgroundWorker backupWorker = new System.ComponentModel.BackgroundWorker();
|
||||
backupWorker.DoWork += delegate(object sender, System.ComponentModel.DoWorkEventArgs e) { Backup(); };
|
||||
backupWorker.RunWorkerAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user