Release bitmaps from android.view.GLES20DisplayList

后端 未结 2 384
北恋
北恋 2021-01-31 23:38

Is anyone knows how to Release bitmaps from android.view.GLES20DisplayList. And why it keeps them alive even if you clean, let\'s say, ImageView manually? Or maybe there is a wa

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-31 23:55

    This seems to be a memory leak in 4.2. Looks like this fix is intended against it: https://android.googlesource.com/platform/frameworks/base/+/034de6b1ec561797a2422314e6ef03e3cd3e08e0

    I disabled hardware acceleration in the manifest for 4.2 for the activity where I encountered this problem, this helped with android.view.GLES20DisplayList memory holding.

    In the manifest for activity: android:hardwareAccelerated="@bool/gpu_enabled"

    In values.xml for v17:

    false   
    

    In default values.xml, I set it to true.

提交回复
热议问题