|
|
|
@ -57,15 +57,7 @@ internal class SharedArrayPoolBuffer<T> : ManagedBufferBase<T>, IRefCounted |
|
|
|
|
|
|
|
[Conditional("DEBUG")] |
|
|
|
[MemberNotNull(nameof(Array))] |
|
|
|
private void CheckDisposed() |
|
|
|
{ |
|
|
|
#pragma warning disable CA1513
|
|
|
|
if (this.Array == null) |
|
|
|
{ |
|
|
|
throw new ObjectDisposedException("SharedArrayPoolBuffer"); |
|
|
|
} |
|
|
|
#pragma warning restore CA1513
|
|
|
|
} |
|
|
|
private void CheckDisposed() => ObjectDisposedException.ThrowIf(this.Array == null, this.Array); |
|
|
|
|
|
|
|
private sealed class LifetimeGuard : RefCountedMemoryLifetimeGuard |
|
|
|
{ |
|
|
|
|