RuntimeHelpers.AllocateTypeAssociatedMemory 方法

定義

多載

名稱 Description
AllocateTypeAssociatedMemory(Type, Int32)

分配與 type 和 相關的記憶體,當 且當 被 Type 卸載時會被釋放。

AllocateTypeAssociatedMemory(Type, Int32, Int32)

AllocateTypeAssociatedMemory(Type, Int32)

來源:
RuntimeHelpers.CoreCLR.cs
來源:
RuntimeHelpers.CoreCLR.cs
來源:
RuntimeHelpers.CoreCLR.cs
來源:
RuntimeHelpers.CoreCLR.cs
來源:
RuntimeHelpers.CoreCLR.cs

分配與 type 和 相關的記憶體,當 且當 被 Type 卸載時會被釋放。

public:
 static IntPtr AllocateTypeAssociatedMemory(Type ^ type, int size);
public static IntPtr AllocateTypeAssociatedMemory(Type type, int size);
static member AllocateTypeAssociatedMemory : Type * int -> nativeint
Public Shared Function AllocateTypeAssociatedMemory (type As Type, size As Integer) As IntPtr

參數

type
Type

與分配記憶體相關的類型。

size
Int32

要分配的記憶體量,以位元組為單位。

傳回

IntPtr

nativeint

分配的記憶體。

適用於

AllocateTypeAssociatedMemory(Type, Int32, Int32)

來源:
RuntimeHelpers.CoreCLR.cs
public:
 static IntPtr AllocateTypeAssociatedMemory(Type ^ type, int size, int alignment);
public static IntPtr AllocateTypeAssociatedMemory(Type type, int size, int alignment);
static member AllocateTypeAssociatedMemory : Type * int * int -> nativeint
Public Shared Function AllocateTypeAssociatedMemory (type As Type, size As Integer, alignment As Integer) As IntPtr

參數

type
Type
size
Int32
alignment
Int32

傳回

IntPtr

nativeint

適用於