class Program
{
//引用类库
[DllImport("psapi.dll")]
static extern int EmptyWorkingSet(IntPtr hwProc);
///
/// 释放内存
///
public static void ClearMemory()
{
GC.Collect();
GC.WaitForPendingFinalizers();
try
{
EmptyWorkingSet(Process.GetCurrentProcess().Handle);
}
catch (Exception)
{
}
finally
{
}
return;
}
static void Main(string[] args)
{
ClearMemory();
}
}
在程序中开一个线程 然后定时执行就行了 效果和360的加速球效果一样 ,目前还没发现有什么问题



