Java Reference
In-Depth Information
Figure 12-3.
The lifecycle of an activity reveals that there's no guarantee of
onDestroy()
be-
ing called.
Because
onDestroy()
mightnotbecalled,youshouldn'tcountonusingthismeth-
od as a place for saving data. For example, when an activity is editing a content pro-
vider's data, those edits should typically be committed in
onPause()
.