anchor.diff:  
       override _.AsReadOnlyStream() =
           new MemoryStream(bytes, offset, length, false) :> Stream
  +
  +[<Sealed>]
  +type SafeUnmanagedMemoryStream =
  +    inherit UnmanagedMemoryStream
  +
  +    val mutable private hold: obj
  +    val mutable private isDisposed: bool
  +
  +    new (addr, length, hold) =
  +        {
  +            inherit UnmanagedMemoryStream(addr, length)
  +            hold = hold
  +            isDisposed = false
  +        }
  +
  +    new (addr: nativeptr<byte>, length: int64, capacity: int64, access: FileAccess, hold) =
  +        {
  +            inherit UnmanagedMemoryStream(addr, length, capacity, access)
  +            hold = hold
  +            isDisposed = false
  +        }
  +
  +    override x.Finalize() =
  +        x.Dispose false
  +
  +    override x.Dispose disposing =
  +        base.Dispose disposing
  +        if not x.isDisposed then
  +            x.hold <- null // Null out so it can be collected.
  +            x.isDisposed <- true
   
   [<Sealed>]
   type RawByteMemory(addr: nativeptr<byte>, length: int, hold: obj) =
  
positive.code:         use stream2 = x.AsStream()
          stream2.CopyTo stream
  
      override x.Copy(srcOffset, dest, destOffset, count) =
          check srcOffset
          Marshal.Copy(NativePtr.toNativeInt addr + nativeint srcOffset, dest, destOffset, count)
  
  
negative.code:         res
  
      override _.AsStream() =
          new SafeUnmanagedMemoryStream(addr, int64 length, hold) :> Stream
  
      override _.AsReadOnlyStream() =
          new SafeUnmanagedMemoryStream(addr, int64 length, int64 length, FileAccess.Read, hold) :> Stream
  
  [<Struct;NoEquality;NoComparison>]
  type ReadOnlyByteMemory(bytes: ByteMemory) =
  