leakcanary
leakcanary copied to clipboard
Plumber fix for InputMethodManager.mNextServedView on Android 8 / API 26
Report:
┬───
│ GC Root: System class
│
├─ android.view.inputmethod.InputMethodManager class
│ Leaking: NO (InputMethodManager↓ is not leaking and a class is never leaking)
│ ↓ static InputMethodManager.sInstance
├─ android.view.inputmethod.InputMethodManager instance
│ Leaking: NO (InputMethodManager is a singleton)
│ Library leak match: instance field android.view.inputmethod.InputMethodManager#mNextServedView
│ ↓ InputMethodManager.mNextServedView
│ ~~~~~~~~~~~~~~~
╰→ android.widget.LinearLayout instance
Leaking: YES (View.mContext references a destroyed activity)
Hprof: repro_lib_leak.hprof.zip
mServedView and mNextServedView point to the same view.
Will be adressed in #2339
PR was closed, lack of time to focus on this, but it's still very much something we can try to fix.