Method

MaplibreNativeFfiRenderSessionabandon

Declaration [src]

MaplibreNativeFfiRenderAbandonResult*
maplibre_native_ffi_render_session_abandon (
  MaplibreNativeFfiRenderSession* self
  GError** error
)

Description [src]

Stops the session right away, without running its pending graphics work.

Use it when the target’s graphics objects are going away and a detach can’t finish first. Pending work completes with MAPLIBRE_NATIVE_FFI_ERROR_TARGET_LOST, and pending frame demands finish with MAPLIBRE_NATIVE_FFI_RENDER_RESULT_TARGET_NOT_READY. Once the call returns, the library no longer uses your graphics objects, and you can attach another session to the map. Release the session afterward.

Abandon keeps the session’s OpenGL and WebGPU objects until the process exits, and reports how many it kept. Detach the session instead to free them.

See mln_render_session_abandon in the C API reference.

Return value

The caller of the method takes ownership of the returned data, and is responsible for freeing it.