onViewDestroyed

open override fun onViewDestroyed()

Called when the opengl thread destroyed the surface and before destroying the native objects. Use it to save the view state.