GLFWdeallocatefun

Type Alias GLFWdeallocatefun 

Source
pub type GLFWdeallocatefun = Option<unsafe extern "C" fn(*mut c_void, *mut c_void)>;
Expand description

@brief The function pointer type for memory deallocation callbacks.

This is the function pointer type for memory deallocation callbacks. A memory deallocation callback function has the following signature: @code void function_name(void* block, void* user) @endcode

This function may deallocate the specified memory block. This memory block will have been allocated with the same allocator.

This function must support being called during @ref glfwInit but before the library is flagged as initialized, as well as during @ref glfwTerminate after the library is no longer flagged as initialized.

The block address will never be NULL. Deallocations of NULL are filtered out before reaching the custom allocator.

If this function returns NULL, GLFW will emit @ref GLFW_OUT_OF_MEMORY.

This function must not call any GLFW function.

@param[in] block The address of the memory block to deallocate. @param[in] user The user-defined pointer from the allocator.

@pointer_lifetime The specified memory block will not be accessed by GLFW after this function is called.

@reentrancy This function should not call any GLFW function.

@thread_safety This function must support being called from any thread that calls GLFW functions.

@sa @ref init_allocator @sa @ref GLFWallocator

@since Added in version 3.4.

@ingroup init

Aliased Type§

pub enum GLFWdeallocatefun {
    None,
    Some(unsafe extern "C" fn(*mut c_void, *mut c_void)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut c_void, *mut c_void))

Some value of type T.