onStop

protected open fun onStop()

Perform one time clean-up operations as the OpMode is stopping.

This method is called after the OpMode has been requested to stop, and will be the last method called before the OpMode is terminated, and is guaranteed to be called.

This method is useful for releasing resources to prevent memory leaks, as motor controllers will be powered off as the OpMode is ending.

See also