MemoryHandle(Void*, GCHandle, IPinnable) Constructor

Definition

Important

This API is not CLS-compliant.

Creates a new memory handle for the block of memory.

C#
[System.CLSCompliant(false)]
public MemoryHandle(void* pointer, System.Runtime.InteropServices.GCHandle handle = default, System.Buffers.IPinnable? pinnable = default);
C#
[System.CLSCompliant(false)]
public MemoryHandle(void* pointer, System.Runtime.InteropServices.GCHandle handle = default, System.Buffers.IPinnable pinnable = default);

Parameters

pointer
Void*

A pointer to memory.

handle
GCHandle

A handle used to pin array buffers.

pinnable
IPinnable

A reference to a manually managed object, or default if there is no memory manager.

Attributes

Applies to

Product Versions
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1