Skip to main content

SDL_CleanupPropertyCallback

Type Alias SDL_CleanupPropertyCallback 

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

A callback used to free resources when a property is deleted.

This should release any resources associated with value that are no longer needed.

This callback is set per-property. Different properties in the same group can have different cleanup callbacks.

This callback will be called during SDL_SetPointerPropertyWithCleanup if the function fails for any reason.

Parameter: userdata an app-defined pointer passed to the callback. Parameter: value the pointer assigned to the property to clean up.

Thread Safety: This callback may fire without any locks held; if this is a concern, the app should provide its own locking.

Available Since: This datatype is available since SDL 3.2.0.

See Also: SDL_SetPointerPropertyWithCleanup

Aliased Type§

pub enum SDL_CleanupPropertyCallback {
    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.