glfwInitAllocator

Function glfwInitAllocator 

Source
pub unsafe extern "C" fn glfwInitAllocator(
    allocator: *const GLFWallocator,
)
Expand description

@brief Sets the init allocator to the desired value.

To use the default allocator, call this function with a NULL argument.

If you specify an allocator struct, every member must be a valid function pointer. If any member is NULL, this function will emit @ref GLFW_INVALID_VALUE and the init allocator will be unchanged.

The functions in the allocator must fulfil a number of requirements. See the documentation for @ref GLFWallocatefun, @ref GLFWreallocatefun and @ref GLFWdeallocatefun for details.

@param[in] allocator The allocator to use at the next initialization, or NULL to use the default one.

@errors Possible errors include @ref GLFW_INVALID_VALUE.

@pointer_lifetime The specified allocator is copied before this function returns.

@thread_safety This function must only be called from the main thread.

@sa @ref init_allocator @sa @ref glfwInit

@since Added in version 3.4.

@ingroup init