Android : Memory leak due to java.lang.ref.FinalizerReference in Android

on Friday, August 8, 2014


I am developing an Android application. I have found a memory leak due to java.lang.ref.FinalizerReference in AudioManager in my application. But,i have not used audio manager in my project or libraries. What could be the issue and how to fix the memory leak



Class Name | Shallow Heap | Retained Heap
-------------------------------------------------------------------------------------------------------------------------------------------------------------
mOuterContext android.app.ContextImpl @ 0x422d7e90 | 120 | 696
|- context android.app.ActivityThread$ContextCleanupInfo @ 0x41fef240 Unreachable | 24 | 160
|- mContext android.media.AudioManager @ 0x4235f650 | 48 | 160
| '- this$0 android.media.AudioManager$1 @ 0x4235f750 | 24 | 24
| '- referent java.lang.ref.FinalizerReference @ 0x4235f770 | 40 | 37,896
| '- next java.lang.ref.FinalizerReference @ 0x4235f7b0 | 40 | 37,936
| '- next java.lang.ref.FinalizerReference @ 0x4235ff20 | 40 | 37,976
| '- next java.lang.ref.FinalizerReference @ 0x4235ff90 | 40 | 38,016
| '- next java.lang.ref.FinalizerReference @ 0x42360918 | 40 | 38,056
| '- next java.lang.ref.FinalizerReference @ 0x42360d90 | 40 | 38,096
| '- next java.lang.ref.FinalizerReference @ 0x42365a60 | 40 | 38,136
| '- next java.lang.ref.FinalizerReference @ 0x42365ec0 | 40 | 38,176
| '- next java.lang.ref.FinalizerReference @ 0x42398c40 | 40 | 38,216
| '- next java.lang.ref.FinalizerReference @ 0x42398cc0 | 40 | 38,256
| '- next java.lang.ref.FinalizerReference @ 0x42373710 | 40 | 38,296
| '- next java.lang.ref.FinalizerReference @ 0x42373eb0 | 40 | 38,336
| '- next java.lang.ref.FinalizerReference @ 0x42374310 | 40 | 38,376
| '- next java.lang.ref.FinalizerReference @ 0x422b63d0 | 40 | 38,416
| '- next java.lang.ref.FinalizerReference @ 0x42381ce0 | 40 | 38,456
| '- next java.lang.ref.FinalizerReference @ 0x423e22d0 | 40 | 38,496
| '- head class java.lang.ref.FinalizerReference @ 0x417100d0 System Class| 16 | 38,608
-------------------------------------------------------------------------------------------------------------------------------------------------------------

3 comments:

Anonymous said...

Did you find an answer to this? I am facing the exact same issue??

Anonymous said...

Did you find an answer to this? I am facing the exact same issue??

Anonymous said...

If you did and can share with me at vaibhav@picswapp.com, I'd really appreciate it. This has left me totally clueless!!

Post a Comment