mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
add a few more gc collect in some spots
This commit is contained in:
@@ -30,6 +30,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Runtime;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Timers;
|
||||
@@ -635,9 +636,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
|
||||
if(m_scene.GetNumberOfClients() == 0)
|
||||
{
|
||||
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
|
||||
GC.Collect();
|
||||
GC.WaitForPendingFinalizers();
|
||||
GC.Collect();
|
||||
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.Default;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user