Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
OnDestroy()如果我们在 Android 应用程序的每个活动中覆盖方法可以吗?
OnDestroy()
@Override public void onDestroy() { super.onDestroy(); }
仅仅通过调用Method super.onDestroy(),onDestroy()它会清理内存资源吗?
super.onDestroy()
onDestroy()
只要您确实调用了超类,就可以覆盖 onDestroy。但是,如果您所做的只是调用超类,您为什么要这样做?