预测所需内存能否成功

需要用到MemoryFailPoint:

using(MemoryFailPoint mfp=new MemoryFailPoint(1500))
{
  //Do using many memory account

catch(InsufficientMemoryException e)
{

  throw e ;

}

原文地址:https://www.cnblogs.com/thyong/p/3245144.html