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 leak on xiaomi devices #2539

Closed
pyricau opened this issue Jun 22, 2023 · 1 comment
Closed

ResourcesImpl.mAppContext leak on xiaomi devices #2539

pyricau opened this issue Jun 22, 2023 · 1 comment
Milestone

Comments

@pyricau
Copy link
Member

pyricau commented Jun 22, 2023

Read this first: https://square.github.io/leakcanary/faq/#can-a-leak-be-caused-by-the-android-sdk

HMD Global and Xiaomi. Android 11, 12, 13

Pattern is clearly ResourcesImpl.mAppContext which shouldn't be a thing.

┬───
│ 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 2.3 kB in 52 objects
│    mOuterContext instance of com.squareup.queue.QueueService
│    ContextImpl.mOuterContext is an instance of com.squareup.queue.QueueService
│    ↓ ContextImpl.mOuterContext
│                  ~~~~~~~~~~~~~
╰→ com.squareup.queue.QueueService instance
​     Leaking: YES (ObjectWatcher was watching this because com.squareup.queue.QueueService received Service#onDestroy() callback and Service not held by ActivityThread)
​     Retaining 823 B in 41 objects
​     key = 5b2c3c9d-fb34-4323-8d10-66ebaede5523
​     watchDurationMillis = 5908
​     retainedDurationMillis = 906
​     mApplication instance of com.squareup.development.SposDevApp
​     mBase instance of android.app.ContextImpl
@pyricau pyricau added this to the 2.12 milestone Jun 29, 2023
@pyricau
Copy link
Member Author

pyricau commented Jun 29, 2023

#2545

@pyricau pyricau closed this as completed Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant