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

prioritization
John Hurliman 2009-10-09 02:49:55 -07:00
parent 76a5cae0b4
commit 77e48a6725
1 changed files with 4 additions and 4 deletions

View File

@ -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();
}
}