开发者

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

开发者 https://www.devze.com 2023-03-03 15:34 出处:网络
Is it okay if we override OnDestroy() method in every activity of Android Application? @Override public void onDestroy开发者_StackOverflow社区() {

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

@Override
    public void onDestroy开发者_StackOverflow社区() {
        super.onDestroy();
}

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


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消