-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
BaseDialogFragment和BaseDialog内存泄漏 #34
Comments
我的想法是在内部加个监听,手动去把它们置空,这样感觉会带来一系列的隐患。 |
我在 Leaks 并没有捕捉内存泄漏的情况 |
我建议你试一下最新的源码编译还会不会出现这个问题,我在之前的版本有修复过关于 Dialog 内存泄漏问题 |
|
内存泄漏你是怎么用工具检测的 |
leakcanary 1.6.2 |
|
你换成这个版本再试试 |
├─ XXXFragment
│ Leaking: NO (Fragment#mFragmentManager is not null)
│ Fragment.mTag=XXX
│ ↓ XXXFragment.XXXDialogBuilder
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
├─ XXXDialog$Builder
│ Leaking: UNKNOWN
│ ↓ XXXDialog$Builder.mDialogFragment
│ ~~~~~~~~~~~~~~~
╰→ XXX.widget.dialog.BaseDialogFragment
Leaking: YES (Fragment#mFragmentManager is null and ObjectWatcher was watching this)
key = b82a6f82-8bbc-452d-8cf0-be816378d1f3
watchDurationMillis = 7714
retainedDurationMillis = 2713
METADATA
Build.VERSION.SDK_INT: 24
Build.MANUFACTURER: samsung
LeakCanary version: 2.0
App process name: comXXX
Analysis duration: 8653 ms |
你换成这个版本再试试看 |
换成beta3不会报泄漏,这是为何? |
可能是旧版本的Bug |
|
Leaks 本身也存在误报,但 Bug 会随着更新而越来越少的,所以要以最新版本为主。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: