我正在使用 LeakCanary 检测内存泄漏。 而且,我不断收到此消息:“ ReportFragment从未被GC处理,但未发现泄漏”。这就是我从 LeakCanary
获得的* NO LEAK FOUND.
* Reference Key: 8c9d6730-3d5e-4ff6-b6f5-4ffd26f523a0
* Device: Xiaomi Xiaomi MI 6 sagit
* Android Version: 8.0.0 API: 26 LeakCanary: 1.6.3 31007b4
* Durations: watch=5020ms, gc=268ms, heap dump=1428ms, analysis=7876ms
* Excluded Refs:
| Field: android.os.Message.obj
| Field: android.os.Message.next
| Field: android.os.Message.target
| Field: android.view.inputmethod.InputMethodManager.mNextServedView
| Field: android.view.inputmethod.InputMethodManager.mServedView
| Field: android.view.inputmethod.InputMethodManager.mServedInputConnection
| Field: android.view.inputmethod.InputMethodManager.mCurRootView
| Field: android.accounts.AccountManager$AmsTask$Response.this$1
| Field: android.view.accessibility.AccessibilityNodeInfo.mOriginalText
| Field: com.android.internal.policy.BackdropFrameRenderer.mDecorView
| Field: android.view.Choreographer$FrameDisplayEventReceiver.mMessageQueue (always)
| Thread:FinalizerWatchdogDaemon (always)
| Thread:main (always)
| Thread:LeakCanary-Heap-Dump (always)
| Class:java.lang.ref.WeakReference (always)
| Class:java.lang.ref.SoftReference (always)
| Class:java.lang.ref.PhantomReference (always)
| Class:java.lang.ref.Finalizer (always)
| Class:java.lang.ref.FinalizerReference (always)
谁能告诉我如何摆脱这种情况?