kiwix-android
kiwix-android copied to clipboard
Remove all Memory leaks from Custom app
trafficstars
Expected behavior Shouldn't Leak
Steps to reproduce the behavior:
- Install a brand new Custom app
- Find Memory Leaks
Environment
- Version of Kiwix Android: 3.4
- Device: Real me
- OS version: 10
Logs
D/LeakCanary:
┬───
│ GC Root: Global variable in native code
│
├─ android.speech.tts.TextToSpeech$Connection$1 instance
│ Leaking: UNKNOWN
│ Retaining 1750918 bytes in 8000 objects
│ Anonymous subclass of android.speech.tts.ITextToSpeechCallback$Stub
│ ↓ TextToSpeech$Connection$1.this$1
│ ~~~~~~
├─ android.speech.tts.TextToSpeech$Connection instance
│ Leaking: UNKNOWN
│ Retaining 1750390 bytes in 7999 objects
│ ↓ TextToSpeech$Connection.this$0
│ ~~~~~~
├─ android.speech.tts.TextToSpeech instance
│ Leaking: UNKNOWN
│ Retaining 1750365 bytes in 7998 objects
│ mContext instance of org.kiwix.kiwixmobile.custom.CustomApp
│ ↓ TextToSpeech.mInitListener
│ ~~~~~~~~~~~~~
├─ org.kiwix.kiwixmobile.core.main.KiwixTextToSpeech$tts$1 instance
│ Leaking: UNKNOWN
│ Retaining 1750026 bytes in 7985 objects
│ Anonymous class implementing android.speech.tts.TextToSpeech$OnInitListener
│ ↓ KiwixTextToSpeech$tts$1.this$0
│ ~~~~~~
├─ org.kiwix.kiwixmobile.core.main.KiwixTextToSpeech instance
│ Leaking: UNKNOWN
│ Retaining 1750010 bytes in 7984 objects
│ context instance of org.kiwix.kiwixmobile.custom.main.CustomMainActivity with mDestroyed = true
│ ↓ KiwixTextToSpeech.onAudioFocusChangeListener
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~
├─ org.kiwix.kiwixmobile.core.main.-$$Lambda$CoreReaderFragment$dJ7yV3A9jJPxjfun6ekvjOK-1AA instance
│ Leaking: UNKNOWN
│ Retaining 12 bytes in 1 objects
│ ↓ -$$Lambda$CoreReaderFragment$dJ7yV3A9jJPxjfun6ekvjOK-1AA.f$0
│ ~~~
╰→ org.kiwix.kiwixmobile.custom.main.CustomReaderFragment instance
Leaking: YES (ObjectWatcher was watching this because org.kiwix.kiwixmobile.custom.main.CustomReaderFragment
received Fragment#onDestroy() callback and Fragment#mFragmentManager is null)
Retaining 71806 bytes in 361 objects
key = ec514970-a68a-421d-a631-b68972454c50
watchDurationMillis = 6268
retainedDurationMillis = 1267
METADATA
Build.VERSION.SDK_INT: 29
Build.MANUFACTURER: realme
LeakCanary version: 2.5
App process name: org.kiwix.kiwixcustomcustomexample
Stats: LruCache[maxSize=3000,hits=5932,misses=81197,hitRate=6%]
RandomAccess[bytes=4123041,reads=81197,travel=30590118522,range=21851238,size=25943630]
Analysis duration: 5172 ms
I/BufferQueueConsumer: [org.kiwix.kiwixcustomcustomexample/leakcanary.internal.activity.LeakActivity#0](this:0x76f85f2800,id:10768,api:1,p:8514,c:783) acquireBuffer: slot 3 is dropped, handle=0x774bca4e80
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.