Why super.onDestroy() in java - Android goes on top in destructors? -
this question has answer here:
i new in java development! may tell me... according logic super.ondestroy(); in destructors goes on top? example:
protected void ondestroy() { super.ondestroy(); releasemediaplayer(); } and not
protected void ondestroy() { releasemediaplayer(); super.ondestroy(); } like c++, obj-c, pascal, etc ??
it depends on want in ondestroy. super.ondestroy (in order):
- dismiss dialogs activity managing.
- close cursors activity managing.
- close open search dialog
if logic put inside ondestroy has 3 things android does, may have worry order. otherwise, , in of cases, not matter.
Comments
Post a Comment