No need to manually mark fragment as destroyed for LeakCanary

It already does so automatically.
This commit is contained in:
Stypox 2023-07-14 20:48:05 +02:00
parent 00257e969e
commit 5d6158ea76
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
1 changed files with 0 additions and 9 deletions

View File

@ -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
//////////////////////////////////////////////////////////////////////////*/