示例#1
0
 /// <summary>
 /// 切记:引用完类组件后,一定要调用此方法来释放!
 /// </summary>
 public static void Dispose()
 {
     FilesQueue.Dispose();
     FilesBlocksQueue.Dispose();
     DownLoadFilesQueue.Dispose();
     DownLoadFilesBlocksQueue.Dispose();
 }
   /// <summary>
  /// 清理所有正在使用的资源。
  /// </summary>
  /// <param name="isDisposing">如果应释放托管资源,为 true;否则为 false</param>
   protected static void Dispose(bool isDisposing)
 {
     if (_alreadyDisposed)
         return;
     if (isDisposing)
     {
         //_serverDownLoadFileBlocksQueue = null;
         _serverDownLoadFileBlocksBag = null;
         _instance = null;
        //GC.SuppressFinalize(this);
     }
     _alreadyDisposed = true;
 }
示例#3
0
 /// <summary>
 /// 清理所有正在使用的资源。
 /// </summary>
 /// <param name="isDisposing">如果应释放托管资源,为 true;否则为 false</param>
 protected static void Dispose(bool isDisposing)
 {
     if (_alreadyDisposed)
     {
         return;
     }
     if (isDisposing)
     {
         //_serverDownLoadFileBlocksQueue = null;
         _serverDownLoadFileBlocksBag = null;
         _instance = null;
         //GC.SuppressFinalize(this);
     }
     _alreadyDisposed = true;
 }