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

OnTransfereeLongClickListener内存泄露! #157

Open
LoveMissLove opened this issue Oct 26, 2021 · 0 comments
Open

OnTransfereeLongClickListener内存泄露! #157

LoveMissLove opened this issue Oct 26, 2021 · 0 comments

Comments

@LoveMissLove
Copy link

2021-10-26 17:31:31.002 7557-7681/com.hitomi.transferimage D/LeakCanary: ====================================
HEAP ANALYSIS RESULT
====================================
1 APPLICATION LEAKS

References underlined with "~~~" are likely causes.
Learn more at https://squ.re/leaks.

26231 bytes retained by leaking objects
Signature: aed18ef391d047fadc802cf98a47598b46e42e
┬───
│ GC Root: Local variable in native code
│
├─ android.os.HandlerThread instance
│    Leaking: NO (PathClassLoader↓ is not leaking)
│    Thread name: 'LeakCanary-Heap-Dump'
│    ↓ HandlerThread.contextClassLoader
├─ dalvik.system.PathClassLoader instance
│    Leaking: NO (OriginalViewHelper$SingletonHolder↓ is not leaking and A ClassLoader is never leaking)
│    ↓ PathClassLoader.runtimeInternalObjects
├─ java.lang.Object[] array
│    Leaking: NO (OriginalViewHelper$SingletonHolder↓ is not leaking)
│    ↓ Object[].[1288]
├─ com.hitomi.tilibrary.transfer.OriginalViewHelper$SingletonHolder class
│    Leaking: NO (a class is never leaking)
│    ↓ static OriginalViewHelper$SingletonHolder.instance
│                                                ~~~~~~~~
├─ com.hitomi.tilibrary.transfer.OriginalViewHelper instance
│    Leaking: UNKNOWN
│    ↓ OriginalViewHelper.transConfig
│                         ~~~~~~~~~~~
├─ com.hitomi.tilibrary.transfer.TransferConfig instance
│    Leaking: UNKNOWN
│    ↓ TransferConfig.longClickListener
│                     ~~~~~~~~~~~~~~~~~
├─ com.hitomi.transferimage.activity.FriendsCircleActivity$FriendsCircleAdapter$1$1 instance
│    Leaking: UNKNOWN
│    Anonymous class implementing com.hitomi.tilibrary.transfer.Transferee$OnTransfereeLongClickListener
│    ↓ FriendsCircleActivity$FriendsCircleAdapter$1$1.this$2
│                                                     ~~~~~~
├─ com.hitomi.transferimage.activity.FriendsCircleActivity$FriendsCircleAdapter$1 instance
│    Leaking: UNKNOWN
│    Anonymous class implementing com.zhy.adapter.recyclerview.MultiItemTypeAdapter$OnItemClickListener
│    ↓ FriendsCircleActivity$FriendsCircleAdapter$1.this$1
│                                                   ~~~~~~
├─ com.hitomi.transferimage.activity.FriendsCircleActivity$FriendsCircleAdapter instance
│    Leaking: UNKNOWN
│    ↓ FriendsCircleActivity$FriendsCircleAdapter.mContext
│                                                 ~~~~~~~~
╰→ com.hitomi.transferimage.activity.FriendsCircleActivity instance
​     Leaking: YES (ObjectWatcher was watching this because com.hitomi.transferimage.activity.FriendsCircleActivity received Activity#onDestroy() callback and Activity#mDestroyed is true)
​     key = 4f01e15f-3b8d-481a-97e7-b2506d827980
​     watchDurationMillis = 5143
​     retainedDurationMillis = 134
====================================
0 LIBRARY LEAKS

A Library Leak is a leak caused by a known bug in 3rd party code that you do not have control over.
See https://square.github.io/leakcanary/fundamentals-how-leakcanary-works/#4-categorizing-leaks
====================================
METADATA

Please include this in bug reports and Stack Overflow questions.

Build.VERSION.SDK_INT: 30
Build.MANUFACTURER: Xiaomi
LeakCanary version: 2.3
App process name: com.hitomi.transferimage
Analysis duration: 6073 ms
Heap dump file path: /data/user/0/com.hitomi.transferimage/files/leakcanary/2021-10-26_17-31-23_505.hprof
Heap dump timestamp: 1635240690997
====================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant