Memory.tryMalloc

Attempts to allocate n_bytes, and returns NULL on failure. Contrast with g_malloc(), which aborts the program on failure.

class Memory
static
void*
tryMalloc

Parameters

nBytes gsize

number of bytes to allocate.

Return Value

Type: void*

the allocated memory, or NULL.

Meta