Firebase ui电话身份验证活动泄漏

时间:2019-11-12 13:13:34

标签: firebase firebase-authentication firebaseui leakcanary

通过firebase-ui启动电话身份验证后,我从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)```

1 个答案:

答案 0 :(得分:1)

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

  

模式:实例字段android.view.ViewGroup $ ViewLocationHolder#mRoot,

     

说明:在Android P中,ViewLocationHolder具有一个mRoot字段,该字段可以   不会在其clear()方法中清除。引入   https://github.com/aosp-mirror/platform_frameworks_base/commit/86b326012813f09d8f1de7d6d26c986a909d   错误报告:https://issuetracker.google.com/issues/112792715