示例#1
0
 public void Unmap(bool wasModified)
 {
     if (permanentArray != null)
     {
         if (wasModified)
         {
             OnModified(null);
         }
         return;
     }
     if (wasModified)
     {
         throw new InvalidOperationException("Was trying to modify a stream-based RawDataResource");
     }
     Interlocked.Decrement(ref mapCount);
     if (mapCount != 0)
     {
         return;
     }
     temporaryArray?.Dispose();
     temporaryArray = null;
 }
示例#2
0
 public override void Dispose()
 {
     base.Dispose();
     permanentArray?.Dispose();
 }