firebase ui phone auth activity 泄漏

firebase ui phone auth activity leaking

通过 firebase-ui 启动 phone 身份验证后,我从 leakcanary 获得了下一份泄漏报告。我不认为我做错了什么。

我也从 ConstraintLayout 和 SubmitConfirmation 中得到泄漏 代码片段

LibraryLeak(className=com.firebase.ui.auth.ui.phone.PhoneActivity, leakTrace=
┬
├─ android.view.ViewGroup$ViewLocationHolder
│    Leaking: NO (a class is never leaking)
│    GC Root: System class
│    ↓ static ViewGroup$ViewLocationHolder.sPool
│                                          ~~~~~
├─ android.util.Pools$SynchronizedPool
│    Leaking: UNKNOWN
│    ↓ Pools$SynchronizedPool.mPool
│                             ~~~~~
├─ java.lang.Object[]
│    Leaking: UNKNOWN
│    ↓ array Object[].[0]
│                     ~~~
├─ android.view.ViewGroup$ViewLocationHolder
│    Leaking: UNKNOWN
│    ↓ ViewGroup$ViewLocationHolder.mRoot
│                                   ~~~~~
├─ androidx.constraintlayout.widget.ConstraintLayout
│    Leaking: YES (View.mContext references a destroyed activity)
│    mContext instance of com.firebase.ui.auth.ui.phone.PhoneActivity with mDestroyed = true
│    View#mParent is set
│    View#mAttachInfo is null (view detached)
│    View.mWindowAttachCount = 1
│    ↓ ConstraintLayout.mContext
╰→ com.firebase.ui.auth.ui.phone.PhoneActivity
​     Leaking: YES (ConstraintLayout↑ is leaking and Activity#mDestroyed is true and ObjectWatcher was watching this)
​     key = 5a91cbea-396c-44e5-9516-f9a5442198f8
​     watchDurationMillis = 5770
​     retainedDurationMillis = 768
, retainedHeapByteSize=645359, pattern=instance field android.view.ViewGroup$ViewLocationHolder#mRoot, description=In Android P, ViewLocationHolder has an mRoot field that is not cleared in its clear() method. Introduced in https://github.com/aosp-mirror/platform_frameworks_base/commit/86b326012813f09d8f1de7d6d26c986a909d Bug report: https://issuetracker.google.com/issues/112792715)```

这是 LibraryLeak,这意味着它是库或 Android 框架代码中的已知泄漏。在底部你可以看到模式:

pattern: instance field android.view.ViewGroup$ViewLocationHolder#mRoot,

description: In Android P, ViewLocationHolder has an mRoot field that is not cleared in its clear() method. Introduced in https://github.com/aosp-mirror/platform_frameworks_base/commit/86b326012813f09d8f1de7d6d26c986a909d Bug report: https://issuetracker.google.com/issues/112792715