Exemplo n.º 1
0
 public void EnsureZeroCapacityDoesNotFreeBuffer()
 {
     using (var buffer = new NativeBuffer(10))
     {
         Assert.NotEqual(buffer.GetHandle().DangerousGetHandle(), IntPtr.Zero);
         buffer.EnsureByteCapacity(0);
         Assert.NotEqual(buffer.GetHandle().DangerousGetHandle(), IntPtr.Zero);
     }
 }
Exemplo n.º 2
0
 public void EnsureZeroCapacityDoesNotFreeBuffer()
 {
     using (var buffer = new NativeBuffer(10))
     {
         buffer.DangerousGetHandle().Should().NotBe(IntPtr.Zero);
         buffer.EnsureByteCapacity(0);
         buffer.DangerousGetHandle().Should().NotBe(IntPtr.Zero);
     }
 }
Exemplo n.º 3
0
 public void EnsureZeroCapacityDoesNotFreeBuffer()
 {
     using (var buffer = new NativeBuffer(10))
     {
         buffer.DangerousGetHandle().Should().NotBe(IntPtr.Zero);
         buffer.EnsureByteCapacity(0);
         buffer.DangerousGetHandle().Should().NotBe(IntPtr.Zero);
     }
 }