Our Activity do most of the cleanup function in onPause() and onStop() callbacks.
But Sometimes some resources leaks memory like long-running services, background threads.This usually happens when we dont closed it properly.
So we need to stop method tracing to overcome this issue.
Here is the implementation
@Override
public void onDestroy() {
super.onDestroy();
android.os.Debug.stopMethodTracing();
}
0 Comment(s)