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

c# - Binding a comma separated list to a List<int> in asp.net web api -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

swift - Button on Table View Cell connected to local function -