Why super.onDestroy() in java - Android goes on top in destructors? -


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

Popular posts from this blog

java - OnDragListener Fires Several Times? -

c# - ajax - How to receive data both html and json from server? -