onDestroy

fun onDestroy()

This method must be called when the activity (that this view is attached to) is destroyed (typically in the onDestroy() method of the activity).