Out of memory error in BitmapFactory

不问归期 提交于 2019-12-06 05:35:13

You have a memory leak on your code. Consider the use of WeakReference, WeakHashMap or SoftReference to avoid strong references. Free unused resources and variables on onLowMemory method of activities.

Also you can use the option BitmapFactory.Options to decode the bitmap as show the examples here.

I posted the some hints to solve this problem here.

first try commenting this code and see if that alone is the issue. It could be something else that might be using up the memory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!