c#强制执行内存回收

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

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

效果十分的显著

 

posted on 2013-12-18 10:51  空明流光  阅读(1291)  评论(0编辑  收藏  举报

导航