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; }
public override void Dispose() { base.Dispose(); permanentArray?.Dispose(); }