62,243
社区成员




[DllImport("kernel32.dll")]
public static extern bool SetProcessWorkingSetSize(IntPtr proc, int min, int max);
public static void Dispose()
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1);
}
自己检测一下内存的占用 超过了就调用一下这个方法 内存迅速下去