RuntimeHelpers.AllocateTypeAssociatedMemory(Type, Int32) 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.
Allocates memory that's associated with the type
and is freed if and when the Type is unloaded.
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
Parameters
- type
- Type
The type associated with the allocated memory.
- size
- Int32
The amount of memory to allocate, in bytes.
Returns
IntPtr
nativeint
The allocated memory.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.