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

Application leak #1

Open
pingpongterminator300 opened this issue Jun 14, 2024 · 0 comments
Open

Application leak #1

pingpongterminator300 opened this issue Jun 14, 2024 · 0 comments

Comments

@pingpongterminator300
Copy link

LeakCanary log:

HEAP ANALYSIS RESULT
====================================
1 APPLICATION LEAKS

References underlined with "~~~" are likely causes.
Learn more at https://squ.re/leaks.

4271 bytes retained by leaking objects
Signature: e5a9939bbcf81f0b7f03f20bbc2ce24fba97a2db
┬───
│ GC Root: Global variable in native code
│
├─ dev.amal.stopwatch.service.StopwatchService$StopwatchBinder instance
│    Leaking: UNKNOWN
│    Retaining 4.8 kB in 78 objects
│    this$0 instance of dev.amal.stopwatch.service.StopwatchService
│    ↓ StopwatchService$StopwatchBinder.this$0
│                                       ~~~~~~
╰→ dev.amal.stopwatch.service.StopwatchService instance
​     Leaking: YES (ObjectWatcher was watching this because dev.amal.stopwatch.service.StopwatchService received
​     Service#onDestroy() callback and Service not held by ActivityThread)
​     Retaining 4.3 kB in 77 objects
​     key = e882fce8-cacf-405a-8eb1-5449f4ec4b7b
​     watchDurationMillis = 13920
​     retainedDurationMillis = 8919
​     mApplication instance of dev.amal.stopwatch.StopwatchApplication
​     mBase instance of android.app.ContextImpl
====================================
0 LIBRARY LEAKS

A Library Leak is a leak caused by a known bug in 3rd party code that you do not have control over.
See https://square.github.io/leakcanary/fundamentals-how-leakcanary-works/#4-categorizing-leaks
====================================
0 UNREACHABLE OBJECTS

An unreachable object is still in memory but LeakCanary could not find a strong reference path
from GC roots.
====================================
METADATA

Please include this in bug reports and Stack Overflow questions.

Build.VERSION.SDK_INT: 34
Build.MANUFACTURER: Xiaomi
LeakCanary version: 2.14
App process name: dev.amal.stopwatch
Class count: 29636
Instance count: 188984
Primitive array count: 146503
Object array count: 26557
Thread count: 20
Heap total bytes: 27893793
Bitmap count: 0
Bitmap total bytes: 0
Large bitmap count: 0
Large bitmap total bytes: 0
Stats: LruCache[maxSize=3000,hits=112988,misses=180110,hitRate=38%]
RandomAccess[bytes=9102417,reads=180110,travel=59051795609,range=33440756,size=42079108]
Heap dump reason: 1 retained objects, app is not visible
Analysis duration: 16898 ms
Heap dump file path: /storage/emulated/0/Download/leakcanary-dev.amal.stopwatch/2024-06-14_22-07-48_531.hprof
Heap dump timestamp: 1718395690773
Heap dump duration: 2535 ms
====================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant