No need to manually mark fragment as destroyed for LeakCanary
It already does so automatically.
This commit is contained in:
parent
00257e969e
commit
5d6158ea76
|
@ -12,7 +12,6 @@ import androidx.fragment.app.FragmentManager;
|
|||
|
||||
import icepick.Icepick;
|
||||
import icepick.State;
|
||||
import leakcanary.AppWatcher;
|
||||
|
||||
public abstract class BaseFragment extends Fragment {
|
||||
protected final String TAG = getClass().getSimpleName() + "@" + Integer.toHexString(hashCode());
|
||||
|
@ -77,14 +76,6 @@ public abstract class BaseFragment extends Fragment {
|
|||
protected void onRestoreInstanceState(@NonNull final Bundle savedInstanceState) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
AppWatcher.INSTANCE.getObjectWatcher().expectWeaklyReachable(
|
||||
this, "Watch for leaks from destroyed fragments.");
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
// Init
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
|
Loading…
Reference in New Issue