-Added LeakCanary to debug build for memory detection on activities and fragments.
-Added LeakCanary no-op lib to release and beta builds.
This commit is contained in:
parent
e88312659b
commit
622d698ff8
4 changed files with 41 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ import android.view.View;
|
|||
import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer;
|
||||
import com.squareup.leakcanary.RefWatcher;
|
||||
|
||||
import icepick.Icepick;
|
||||
|
||||
|
|
@ -67,6 +68,13 @@ public abstract class BaseFragment extends Fragment {
|
|||
protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
RefWatcher refWatcher = App.getRefWatcher(getActivity());
|
||||
refWatcher.watch(this);
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
// Init
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue