android: Why onDestroy not be called when i call finsh? -


in code call finsh on activity ondestroy method of activity not called. can tell me why? when ondestroy method called? thanks

ondestroy() called when system low on resources(memory, cpu time , on) , makes decision kill activity/application or when calls finish() on activity.

so, test code() can make test button, call finish() on activity.

i believe don't need call stuff in ondestroy() until adap not critical resource. , in case android system has mechanisms dispose them.

for more details can refer here


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -