Does onDestroy() or finish() actually kill the activity?

后端 未结 3 1709
失恋的感觉
失恋的感觉 2021-01-02 23:15

Actually I know i am asking about the simple and basic concept of Android. But I am a little bit confused about these finish() and onDestroy() meth

3条回答
  •  走了就别回头了
    2021-01-02 23:45

    Finish() will literally finish your activity and if no references are present a GC will recover resources. onDestory() is actually a method that the system will call when it is destroying your activity and you are supposed to implement this function. You dont need to worry avout destroying your app , android does it for you.

提交回复
热议问题