Exemple #1
0
 public void FreedBufferIsEmpty()
 {
     using (var buffer = new NativeBuffer(5))
     {
         buffer.ByteCapacity.Should().Be(5);
         buffer.Free();
         buffer.ByteCapacity.Should().Be(0);
         buffer.DangerousGetHandle().Should().Be(IntPtr.Zero);
     }
 }
Exemple #2
0
 public void FreedBufferIsEmpty()
 {
     using (var buffer = new NativeBuffer(5))
     {
         buffer.ByteCapacity.Should().Be(5);
         buffer.Free();
         buffer.ByteCapacity.Should().Be(0);
         buffer.DangerousGetHandle().Should().Be(IntPtr.Zero);
     }
 }