Sitelet https://web.archive.org/web/20201105153555/https://github.com/square/leakcanary/issues/1982
Skip to content
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

WindowManagerGlobal leaks LinearLayout. #1982

Open
mickverm opened this issue Oct 28, 2020 · 1 comment
Open

WindowManagerGlobal leaks LinearLayout. #1982

mickverm opened this issue Oct 28, 2020 · 1 comment

Comments

@mickverm
Copy link

@mickverm mickverm commented Oct 28, 2020 •

This leak looks similar to a leak which already gets distinguished as a Library leak:

I'm not able to consistently reproduce this leak.

LeakTrace information

    ┬───
    │ GC Root: System class
    │
    ├─ android.view.WindowManagerGlobal class
    │    Leaking: NO (a class is never leaking)
    │    ↓ static WindowManagerGlobal.sDefaultWindowManager
    │                                 ~~~~~~~~~~~~~~~~~~~~~
    ├─ android.view.WindowManagerGlobal instance
    │    Leaking: UNKNOWN
    │    Retaining 643 bytes in 13 objects
    │    ↓ WindowManagerGlobal.mViews
    │                          ~~~~~~
    ├─ java.util.ArrayList instance
    │    Leaking: UNKNOWN
    │    Retaining 60 bytes in 2 objects
    │    ↓ ArrayList.elementData
    │                ~~~~~~~~~~~
    ├─ java.lang.Object[] array
    │    Leaking: UNKNOWN
    │    Retaining 40 bytes in 1 objects
    │    ↓ Object[].[0]
    │               ~~~
    ├─ android.widget.LinearLayout instance
    │    Leaking: YES (View.mContext references a destroyed activity)
    │    Retaining 5952 bytes in 31 objects
    │    View is part of a window view hierarchy
    │    View.mAttachInfo is not null (view attached)
    │    View.mWindowAttachCount = 1
    │    mContext instance of eu.unmatched.lynx.ui.activities.main.MainActivity with mDestroyed = true
    │    ↓ LinearLayout.mContext
    ╰→ eu.unmatched.lynx.ui.activities.main.MainActivity instance
    ​     Leaking: YES (ObjectWatcher was watching this because eu.unmatched.lynx.ui.activities.main.MainActivity received
    ​     Activity#onDestroy() callback and Activity#mDestroyed is true)
    ​     Retaining 95623 bytes in 1464 objects
    ​     key = 8da7d617-f46c-4f03-ba19-d9fe2bbcdb49
    ​     watchDurationMillis = 5189
    ​     retainedDurationMillis = 187
    ​     mApplication instance of eu.unmatched.lynx.MyApplication
    ​     mBase instance of androidx.appcompat.view.ContextThemeWrapper, not wrapping known Android context
    
    METADATA
    
    Build.VERSION.SDK_INT: 27
    Build.MANUFACTURER: POINTMOBILE
    LeakCanary version: 2.5
    App process name: eu.unmatched.lynx.lite
    Stats: LruCache[maxSize=3000,hits=1636,misses=38365,hitRate=4%]
    RandomAccess[bytes=1931040,reads=38365,travel=13137515160,range=12301429,size=15381381]
    Analysis duration: 11947 ms

2020-10-28_11-27-03_692.zip

@mickverm mickverm added the type: leak label Oct 28, 2020
@pyricau
Copy link
Member

@pyricau pyricau commented Oct 31, 2020

👍 Looks like we need to add "android.view.WindowManagerGlobal", "mViews" to WINDOW_MANAGER_GLOBAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.