destroy

fun destroy()

Tears down the view and its MapLibre resources.

Safe to call repeatedly (idempotent) and safe to call even while a lifecycle is driving the view — use it to force teardown from a host the lifecycle doesn't cover, e.g. Compose AndroidView(onRelease = { it.destroy() }) or removing the view from its parent manually. A later ON_DESTROY from the observed lifecycle is then a no-op. Mirrors GeoARView / SceneView's destroy().