Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AllocZeroed() [2/2]

static unsafe void * System.Runtime.InteropServices.NativeMemory.AllocZeroed ( nuint elementCount,
nuint elementSize )
inlinestatic

Definition at line 83 of file NativeMemory.cs.

84 {
85 void* ptr = Interop.Ucrtbase.calloc(elementCount, elementSize);
86 if (ptr == null)
87 {
88 ThrowHelper.ThrowOutOfMemoryException();
89 }
90 return ptr;
91 }
static unsafe void * calloc(nuint num, nuint size)

References Interop.Ucrtbase.calloc(), and System.ThrowHelper.ThrowOutOfMemoryException().