c#强制执行内存回收

[DllImport("psapi.dll")]
private static extern int EmptyWorkingSet(int hProcess);

GC.Collect();
GC.WaitForPendingFinalizers();
EmptyWorkingSet(Process.GetCurrentProcess().Handle.ToInt32());

效果十分的显著
原文地址:https://www.cnblogs.com/nanfei/p/3479885.html