【发布时间】:2023-03-20 19:05:01
【问题描述】:
为什么 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```
【问题讨论】:
-
您好,您找到解决办法了吗?
标签: firebase leakcanary