Class MemoryOwnedHandle
public class MemoryOwnedHandle : MemoryHandle, IDisposable, IEquatable<MemoryHandle>
- Inheritance
-
MemoryOwnedHandle
- Implements
- Derived
- Inherited Members
Constructors
MemoryOwnedHandle(nint)
Creates a new instance of MemoryOwnedHandle. Assumes that the given pointer is owned by the runtime.
public MemoryOwnedHandle(nint ptr)
Parameters
ptr
nint
Methods
FromUnowned(nint)
Create a MemoryOwnedHandle from a pointer that is assumed unowned. To do so a boxed copy is created of the given pointer to be used as the handle.
public static MemoryOwnedHandle FromUnowned(nint ptr)
Parameters
ptr
nintA pointer to a Memory which is not owned by the runtime.
Returns
- MemoryOwnedHandle
A MemoryOwnedHandle
ReleaseHandle()
When overridden in a derived class, executes the code required to free the handle.
protected override bool ReleaseHandle()