Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it okay if we override OnDestroy() method in every activity of Android Application?

Is it okay if we override OnDestroy() method in every activity of Android Application?

@Override
    public void onDestroy() {
        super.onDestroy();
}

Just by calling super.onDestroy() in onDestroy() Method, will it cleanup the memory resources?

like image 772
Girish Avatar asked May 05 '11 05:05

Girish


1 Answers

It's fine to override onDestroy, so long as you do call up to the superclass. If all you're doing is calling up to the superclass, though, why would you do it?

like image 108
Ted Hopp Avatar answered Sep 19 '22 17:09

Ted Hopp