android 的神秘内存泄露

发布于 2022-09-12 13:50:48 字数 5855 浏览 59 评论 0

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

┬───
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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文