RuntimeHelpers.AllocateTypeAssociatedMemory 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| AllocateTypeAssociatedMemory(Type, Int32) |
分配與 |
| AllocateTypeAssociatedMemory(Type, Int32, Int32) |
AllocateTypeAssociatedMemory(Type, Int32)
分配與 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)
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