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

Memory leak #26

Open
vadhub opened this issue May 14, 2023 · 1 comment
Open

Memory leak #26

vadhub opened this issue May 14, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@vadhub
Copy link
Owner

vadhub commented May 14, 2023

after launching the application, I received a memory leak notification from LeakCanary:

    ┬───
    │ GC Root: Global variable in native code
    │
    ├─ com.vad.pomodoro.domain.MyService$BinderTimer instance
    │    Leaking: UNKNOWN
    │    Retaining 248.8 kB in 7011 objects
    │    this$0 instance of com.vad.pomodoro.domain.MyService
    │    ↓ MyService$BinderTimer.this$0
    │                            ~~~~~~
    ╰→ com.vad.pomodoro.domain.MyService instance
    ​     Leaking: YES (ObjectWatcher was watching this because com.vad.pomodoro.domain.MyService received
    ​     Service#onDestroy() callback and Service not held by ActivityThread)
    ​     Retaining 248.2 kB in 7010 objects
    ​     key = a6b6d3e6-c111-4888-98cf-4e2a2b2dc2ac
    ​     watchDurationMillis = 5909
    ​     retainedDurationMillis = 909
    ​     mApplication instance of com.vad.pomodoro.App
    ​     mBase instance of android.app.ContextImpl
METADATA

Build.VERSION.SDK_INT: 33
Build.MANUFACTURER: samsung
LeakCanary version: 2.10
App process name: com.vad.pomodoro
Class count: 26994
Instance count: 238594
Primitive array count: 147465
Object array count: 34527
Thread count: 59
Heap total bytes: 26529637
Bitmap count: 33
Bitmap total bytes: 838269
Large bitmap count: 0
Large bitmap total bytes: 0
Db 1: open /data/user/0/com.vad.pomodoro/databases/http_auth.db
Count of retained yet cleared: 1 KeyedWeakReference instances
Stats: LruCache[maxSize=3000,hits=122041,misses=225167,hitRate=35%]
RandomAccess[bytes=11206412,reads=225167,travel=99158299322,range=32709052,size=41271339]
Analysis duration: 21009 ms

The leak occurs in the service but the source is unknown.

You need to check what is "leaking" and solve it

@vadhub vadhub self-assigned this May 14, 2023
@vadhub vadhub added the bug Something isn't working label May 18, 2023
@vadhub
Copy link
Owner Author

vadhub commented May 18, 2023

memory leak appeared once during the entire period of use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant