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

@@ -31,6 +31,7 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Reflection;
using System.Runtime;
using CSJ2K;
using Nini.Config;
@@ -261,8 +262,11 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
m_colors.Clear();
m_warpTextures.Clear();
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
GC.Collect();
// m_log.Debug("[WARP 3D IMAGE MODULE]: GC.Collect()");
GC.WaitForPendingFinalizers();
GC.Collect();
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.Default;
return bitmap;
}