Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

android 的神秘内存泄露

下面这种内存泄露如何分析呢?求大神告知

┬───
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │ GC Root: System class
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ├─ android.app.ActivityThread class
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Leaking: NO (a class is never leaking)
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    ↓ static ActivityThread.sCurrentActivityThread
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │                            ~~~~~~~~~~~~~~~~~~~~~~
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ├─ android.app.ActivityThread instance
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Leaking: UNKNOWN
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Retaining 80143 bytes in 1444 objects
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    mInitialApplication instance of com.booster.app.HApplication
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    mSystemContext instance of android.app.ContextImpl, not wrapping known Android context
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    mSystemUiContext instance of android.app.ContextImpl, not wrapping known Android context
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    ↓ ActivityThread.mNewActivities
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │                     ~~~~~~~~~~~~~~
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ├─ android.app.ActivityThread$ActivityClientRecord instance
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Leaking: UNKNOWN
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Retaining 2071366 bytes in 17583 objects
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    activity instance of com.booster.app.main.HomeActivity with mDestroyed = false
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    ↓ ActivityThread$ActivityClientRecord.nextIdle
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │                                          ~~~~~~~~
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ├─ android.app.ActivityThread$ActivityClientRecord instance
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Leaking: UNKNOWN
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Retaining 2070333 bytes in 17557 objects
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    activity instance of com.booster.app.main.result.CompletePageActivityOld with mDestroyed = true
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    ↓ ActivityThread$ActivityClientRecord.nextIdle
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │                                          ~~~~~~~~
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ├─ android.app.ActivityThread$ActivityClientRecord instance
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Leaking: UNKNOWN
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Retaining 861090 bytes in 9779 objects
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    activity instance of com.kwad.sdk.api.proxy.app.KsFullScreenVideoActivity with mDestroyed = true
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    ↓ ActivityThread$ActivityClientRecord.nextIdle
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │                                          ~~~~~~~~
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ├─ android.app.ActivityThread$ActivityClientRecord instance
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Leaking: UNKNOWN
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    Retaining 134267 bytes in 2809 objects
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    activity instance of com.booster.app.main.anim.CourseAnimActivity with mDestroyed = true
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │    ↓ ActivityThread$ActivityClientRecord.activity
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: │                                          ~~~~~~~~
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ╰→ com.booster.app.main.anim.CourseAnimActivity instance
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ?     Leaking: YES (ObjectWatcher was watching this because com.booster.app.main.anim.CourseAnimActivity received
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ?     Activity#onDestroy() callback and Activity#mDestroyed is true)
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ?     Retaining 6511 bytes in 218 objects
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ?     key = f1135efe-61db-4f5a-a96b-4db32e73de00
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ?     watchDurationMillis = 43602
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ?     retainedDurationMillis = 38592
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ?     mApplication instance of com.booster.app.HApplication
2020-12-28 14:06:45.065 19720-26550/com.clean.apple.app D/LeakCanary: ?     mBase instance of androidx.appcompat.view.ContextThemeWrapper, not wrapping known Android context

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...