Memory.tryMalloc

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

struct Memory
static
void*
tryMalloc
(
size_t nBytes
)

Parameters

nBytes size_t

number of bytes to allocate.

Return Value

Type: void*

the allocated memory, or %NULL.

Meta