/// <summary> /// Hackish method used to reduce the application's working set. /// </summary> public static void MinimizeAppWorkingSet() { GC.Collect(); GC.WaitForPendingFinalizers(); Syscalls.SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, -1, -1); }