lifecycle callback methods
Note: The system calls
onDestroy()
after it has already called onPause()
and onStop()
in all situations except one: when you call finish()
from within the onCreate()
method. In some cases, such as when your activity operates as a temporary decision maker to launch another activity, you might call finish()
from within onCreate()
to destory the activity. In this case, the system immediately calls onDestroy()
without calling any of the other lifecycle methods.요는 예외 사항으로 onCreate()에서 finish()를 호출하면 바로 onDestroy()가 호출된다는 것