onCleared

open override fun onCleared()

Cleans up all resources and connections when the ViewModel is no longer needed. This includes closing navigation data connections and camera behavior monitoring. Must be called to prevent memory leaks.