DoubleClick icon indicating copy to clipboard operation
DoubleClick copied to clipboard

请问内存泄漏怎么处理。

Open AndroidKid19 opened this issue 4 years ago • 0 comments

2020-07-17 23:49:26.421 8975-9542/com.yway.scomponent.wheel D/LeakCanary: ==================================== HEAP ANALYSIS RESULT ==================================== 1 APPLICATION LEAKS

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

39820 bytes retained by leaking objects
Signature: a2addd2bfda4aec9c6610e21e8179e02487a8e7
┬───
│ GC Root: Input or output parameters in native code
│
├─ okio.AsyncTimeout class
│    Leaking: NO (PathClassLoader↓ is not leaking and a class is never leaking)
│    ↓ static AsyncTimeout.$class$classLoader
├─ dalvik.system.PathClassLoader instance
│    Leaking: NO (AspectDoubleClick↓ is not leaking and A ClassLoader is never leaking)
│    ↓ PathClassLoader.runtimeInternalObjects
├─ java.lang.Object[] array
│    Leaking: NO (AspectDoubleClick↓ is not leaking)
│    ↓ Object[].[619]
├─ com.liys.doubleclicklibrary.aspect.AspectDoubleClick class
│    Leaking: NO (a class is never leaking)
│    ↓ static AspectDoubleClick.ajc$perSingletonInstance
│                               ~~~~~~~~~~~~~~~~~~~~~~~~
├─ com.liys.doubleclicklibrary.aspect.AspectDoubleClick instance
│    Leaking: UNKNOWN
│    ↓ AspectDoubleClick.lastView
│                        ~~~~~~~~
├─ androidx.appcompat.widget.AppCompatButton instance
│    Leaking: YES (View.mContext references a destroyed activity)
│    mContext instance of com.yway.scomponent.user.mvp.ui.activity.AddUsefulExprActivity with mDestroyed = true
│    View#mParent is set
│    View#mAttachInfo is null (view detached)
│    View.mID = R.id.btn_commit
│    View.mWindowAttachCount = 1
│    ↓ AppCompatButton.mContext
╰→ com.yway.scomponent.user.mvp.ui.activity.AddUsefulExprActivity instance
​     Leaking: YES (ObjectWatcher was watching this because com.yway.scomponent.user.mvp.ui.activity.AddUsefulExprActivity received Activity#onDestroy() callback and Activity#mDestroyed is true)
​     key = a0b5879a-7600-4e7c-b1ff-ca685046a7f4
​     watchDurationMillis = 5150
​     retainedDurationMillis = 144
====================================
0 LIBRARY LEAKS

Library Leaks are leaks coming from the Android Framework or Google libraries.
====================================
METADATA

Please include this in bug reports and Stack Overflow questions.

Build.VERSION.SDK_INT: 29
Build.MANUFACTURER: vivo
LeakCanary version: 2.2
App process name: com.yway.scomponent.wheel
Analysis duration: 6254 ms
Heap dump file path: /storage/emulated/0/Download/leakcanary-com.yway.scomponent.wheel/2020-07-17_23-49-18_235.hprof
Heap dump timestamp: 1595000966418
====================================

AndroidKid19 avatar Jul 17 '20 15:07 AndroidKid19