public void UnPinAndTakeArrayOwnership() { Foo[] data = null; using (PinnedBuffer <Foo> buffer = new PinnedBuffer <Foo>(42)) { data = buffer.UnPinAndTakeArrayOwnership(); Assert.True(buffer.IsDisposedOrLostArrayOwnership); } Assert.NotNull(data); Assert.True(data.Length >= 42); }