Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResourcesImpl.mAppContext library leak applies to realme as well #2560

Closed
billdizl opened this issue Aug 9, 2023 · 2 comments · Fixed by #2600
Closed

ResourcesImpl.mAppContext library leak applies to realme as well #2560

billdizl opened this issue Aug 9, 2023 · 2 comments · Fixed by #2600
Milestone

Comments

@billdizl
Copy link

billdizl commented Aug 9, 2023

┬───
│ GC Root: System class
│
├─ android.content.res.ResourcesImpl class
│    Leaking: NO (a class is never leaking)
│    ↓ static ResourcesImpl.mAppContext
│                           ~~~~~~~~~~~
├─ android.app.ContextImpl instance
│    Leaking: UNKNOWN
│    Retaining 4.8 kB in 18 objects
│    mOuterContext instance of com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService
│    ContextImpl.mOuterContext is an instance of com.google.android.datatransport.runtime.scheduling.jobscheduling.
│    JobInfoSchedulerService
│    ↓ ContextImpl.mOuterContext
│                  ~~~~~~~~~~~~~
╰→ com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService instance
​     Leaking: YES (ObjectWatcher was watching this because com.google.android.datatransport.runtime.scheduling.
​     jobscheduling.JobInfoSchedulerService received Service#onDestroy() callback and Service not held by
​     ActivityThread)
​     Retaining 3.3 kB in 6 objects
​     key = 7ae71bc0-de96-4166-9846-ee480bba5518
​     watchDurationMillis = 15048
​     retainedDurationMillis = 10046
​     mApplication instance of xxx.xxx.view.Application
​     mBase instance of android.app.ContextImpl

METADATA

Build.VERSION.SDK_INT: 31
Build.MANUFACTURER: realme
LeakCanary version: 2.12
App process name: xxx
Class count: 53013
Instance count: 443955
Primitive array count: 269029
Object array count: 62508
Thread count: 121
Heap total bytes: 66029720
Bitmap count: 271
Bitmap total bytes: 115775287
Large bitmap count: 0
Large bitmap total bytes: 0
Db 1: closed /data/user/0/databases/google_app_measurement_local.db
Db 2: open /data/user/0/databases/com.google.android.datatransport.events
Db 3: open /data/user/0/databases/leaks.db
Db 4: closed /data/user/0/databases/google_app_measurement_local.db
Db 5: closed /data/user/0/databases/google_app_measurement_local.db
Db 6: open /data/user/0/databases/sensorsdata
Stats: LruCache[maxSize=3000,hits=152941,misses=357580,hitRate=29%]
RandomAccess[bytes=19233364,reads=357580,travel=260378355816,range=69789092,size=91373937]
Analysis duration: 24447 ms
@pyricau
Copy link
Member

pyricau commented Jan 2, 2024

Looks like it's this known leak:

Except, this time, the manufacturer is realme: https://en.wikipedia.org/wiki/Realme

@billdizl
Copy link
Author

billdizl commented Jan 2, 2024

yes, looks like it's this known leak, but this manufacturer is Oppo's sub brand realme

@pyricau pyricau changed the title leakcanary leaking, i don't know why,Transport Runtime 3.1.9 ResourcesImpl.mAppContext library leak applies to realme as well Jan 2, 2024
pyricau added a commit that referenced this issue Jan 2, 2024
Fixes #2592
Fixes #2575
Fixes #2563
Fixes #2560
Fixes #2550
pyricau added a commit that referenced this issue Jan 2, 2024
Fixes #2592
Fixes #2575
Fixes #2563
Fixes #2560
Fixes #2550
@pyricau pyricau added this to the 2.13 milestone Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants