Memory leak in android.os.PowerManager

I have identified a memory leak, with the following report from Eclipse Memory Analyzer

'- mDrawBitmap
   '- pieChartView mine.PieChartFragment
      '- mCurrentPrimaryItem
         '- pieChartFragmentPagerAdapter
            '- pieChartHolder
               '- mContext android.os.PowerManager
                  '- mPowerManager android.view.ViewRootImpl
                     '- this$0 android.view.ViewRootImpl$WindowInputEventReceiver
                        '- referent java.lang.ref.FinalizerReference


I don't use PowerManager at all in my code. How could he reference my class? The PieChartView has a large bitmap and is causing a memory leak for me.

edit: I am observing an issue on android 4.4.2 device. Checking the Android 4.4.3 change log, I see Power Manager display wakelock fix

, but I cannot find more details on what was fixed and the error symptoms.


source to share

All Articles