-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InputMethodManager.mLastSrvView memory leak in Android6.0 with huawei mobile phone #572
Comments
Leaks for certain manufacturers are also added to AndroidExcludedRefs. You can file a pull request with your desired addition. |
I have same question , how to deal with ? thanks |
Thank you for your report, it looks like this might be a leak in the Android SDK. Please read the following entry in our FAQ: Can a leak be caused by the Android SDK?. We don't have enough time to do the investigative work on this type of issue, so I will close this issue for now. We'll happily take contributions to |
Too bad this was closed, I'm seeing it too. |
For info, for people wanting to hide this temporarily to focus on leaks in their own code, the following seems to ignore it. In my case, I saw it from a ExcludedRefs excludedRefs = AndroidExcludedRefs.createAppDefaults()
.instanceField("android.view.inputmethod.InputMethodManager", "sInstance")
.instanceField("android.view.inputmethod.InputMethodManager", "mLastSrvView")
.instanceField("com.android.internal.policy.PhoneWindow$DecorView", "mContext")
.instanceField("android.support.v7.widget.SearchView$SearchAutoComplete", "mContext")
.build();
LeakCanary.refWatcher(this)
.listenerServiceClass(DisplayLeakService.class)
.excludedRefs(excludedRefs)
.buildAndInstall(); |
where should these code be writted? |
@ckwcc Just init in your CustomApplication.java |
com.xxx.activity.XXXActivity has leaked:
i just fond this with mCurRootView excludedRefs
INPUT_METHOD_MANAGER__ROOT_VIEW = new AndroidExcludedRefs("INPUT_METHOD_MANAGER__ROOT_VIEW", 6, VERSION.SDK_INT >= 15 && VERSION.SDK_INT <= 23, null) {
void add(Builder excluded) {
excluded.instanceField("android.view.inputmethod.InputMethodManager", "mCurRootView").reason("The singleton InputMethodManager is holding a reference to mCurRootView long after the activity has been destroyed. Observed on ICS MR1: #1 (comment) Hack: https://gist.github.com/pyricau/4df64341cc978a7de414");
}
};
so do you consider to add this into excludedrefs?
The text was updated successfully, but these errors were encountered: