Memory.tryRealloc

Attempts to realloc mem to a new size, n_bytes, and returns NULL on failure. Contrast with g_realloc(), which aborts the program on failure. If mem is NULL, behaves the same as g_try_malloc().

class Memory
static
void*
tryRealloc
(
void* mem
,)

Parameters

mem void*

previously-allocated memory, or NULL.

nBytes gsize

number of bytes to allocate.

Return Value

Type: void*

the allocated memory, or NULL.

Meta