Memory.tryMalloc0

Attempts to allocate n_bytes, initialized to 0's, and returns NULL on failure. Contrast with g_malloc0(), which aborts the program on failure. Since 2.8

class Memory
static
void*
tryMalloc0

Parameters

nBytes gsize

number of bytes to allocate

Return Value

Type: void*

the allocated memory, or NULL

Meta