Memory2D<T>.Pin Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a handle for the memory. The GC will not move the memory until the returned MemoryHandle is disposed, enabling taking and using the memory's address.
public System.Buffers.MemoryHandle Pin ();
member this.Pin : unit -> System.Buffers.MemoryHandle
Public Function Pin () As MemoryHandle
Returns
A MemoryHandle instance wrapping the pinned handle.
Exceptions
An instance with nonprimitive (non-blittable) members cannot be pinned.