add a few more gc collect in some spots

This commit is contained in:
UbitUmarov
2018-09-29 17:42:12 +01:00
parent 5a0c9c2fcf
commit ed0e2623b9
8 changed files with 39 additions and 8 deletions

View File

@@ -118,8 +118,6 @@ namespace OpenSim.Framework.Servers.HttpServer
/// </summary>
string StatusDescription { get; set; }
// bool ReuseContext { get; set; }
/// <summary>
/// Add a header field and content to the response.
/// </summary>

View File

@@ -31,6 +31,7 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
@@ -508,7 +509,11 @@ namespace OpenSim.Framework.Servers
private void HandleForceGc(string module, string[] args)
{
Notice("Manually invoking runtime garbage collection");
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.Default;
}
public virtual void HandleShow(string module, string[] cmd)