示例#1
0
 protected override void Dispose(bool disposing)
 {
     if (isDisposed)
     {
         return;
     }
     if (isClone || buffers == null)
     {
         return;
     }
     try
     {
         for (int bufNr = 0; bufNr < buffers.Length; bufNr++)
         {
             // unmap the buffer (if enabled) and at least unset it for GC
             try
             {
                 Enclosing_Instance.CleanMapping(buffers[bufNr]);
             }
             finally
             {
                 buffers[bufNr] = null;
             }
         }
     }
     finally
     {
         buffers = null;
     }
     isDisposed = true;
 }
示例#2
0
            protected override void Dispose(bool isDisposing)
            {
                if (isDisposed)
                {
                    return;
                }

                if (isDisposing)
                {
                    if (isClone || buffer == null)
                    {
                        return;
                    }
                    // unmap the buffer (if enabled) and at least unset it for GC
                    try
                    {
                        Enclosing_Instance.CleanMapping(buffer);
                    }
                    finally
                    {
                        buffer = null;
                    }
                }

                isDisposed = true;
            }