I have an activity and I call the finish() method and the activity is not cleared from memory.
After calling finish() , I see that the method onDestroy() is executed successfully (and I clear all my variables and stuff in there).
Should it be cleared from memory or its how android works? As I understand the LifeCycle of the Activity is finished.
And if it keeps the app in memory so it runs faster the 2nd time the user uses it, what kind of objects can I leave in memory to reuse? If I understand correctly, I am suppose to clear everything on onDestroy.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…