API

NativeMemory.Alloc

Allocates native storage; release with its matching Free API.

Formal Syntax & Structure

csharp syntaxcsharp
unsafe { void* p = NativeMemory.Alloc(4); NativeMemory.Free(p); }

Working Example

Example Snippetcsharp
// Documentary fragment; see linked lesson for context.unsafe { void* p = NativeMemory.Alloc(4); NativeMemory.Free(p); }
C# & .NET Reference