为什么 Leak Canary 将 Google firebase API 检测为泄漏?

问题描述

为什么 Leak Canary 会将 Google firebase API 检测为泄漏? 当我在使用 firebase 时启动应用程序时,它会不断检测内存泄漏。有没有办法阻止这种情况?谢谢。

┬───
│ GC Root: Global variable in native code
│
├─ com.google.firebase.auth.api.fallback.service.zza instance
│    Leaking: UNKNowN
│    Retaining 634 B in 9 objects
│    zza instance of com.google.firebase.auth.api.fallback.service.
│    FirebaseAuthFallbackService
│    ↓ zza.zza
│          ~~~
╰→ com.google.firebase.auth.api.fallback.service.FirebaseAuthFallbackService
​  instance
​     Leaking: YES (ObjectWatcher was watching this because com.google.firebase.
​     auth.api.fallback.service.FirebaseAuthFallbackService received
​     Service#onDestroy() callback)
​     Retaining 606 B in 8 objects
​     key = 7ab80331-3185-47d4-b999-118434212080
​     watchDurationMillis = 5284
​     retainedDurationMillis = 278
​     mApplication instance of com.example.app.App
​     mBase instance of android.app.ContextImpl

MetaDATA

Build.VERSION.SDK_INT: 27
Build.MANUFACTURER: iLA
LeakCanary version: 2.6
App process name: com.example.app
Stats: LruCache[maxSize=3000,hits=1327,misses=42351,hitRate=3%]
RandomAccess[bytes=2171000,reads=42351,travel=15377633875,range=14122402,size=17
486349]
Heap dump reason: 1 retained objects,app is not visible
Analysis duration: 16095 ms```

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)