遇到一个 fragment 泄漏的问题
大利猫 2015-10-14 05:37:26 使用 leak canary 发现了一个fragment的内存泄漏一直找不到原因 ,各位帮看看,引用栈:
In com.vanke.activity:1.0:1.
* com.vanke.activity.act.home.MainFragment has leaked:
* GC ROOT static android.view.inputmethod.InputMethodManager.sInstance
* references android.view.inputmethod.InputMethodManager.mCurRootView
* references com.android.internal.policy.impl.PhoneWindow$DecorView.mContext
* references com.vanke.activity.act.home.MainActivity.mFragmentManager
* references android.app.FragmentManagerImpl.mActive
* references java.util.ArrayList.array
* references array java.lang.Object[].[0]
* leaks com.vanke.activity.act.home.MainFragment instance
* Reference Key: 4df07d87-564f-4530-8e77-bbcf7b13f717
* Device: HUAWEI Huawei H60-L11 H60-L11
* Android Version: 4.4.2 API: 19
* Durations: watch=5244ms, gc=133ms, heap dump=459ms, analysis=8643ms