首页 > 代码库 > Android手动回收bitmapisRecycled(),引发Canvas: trying to use a recycled bitmap处理

Android手动回收bitmapisRecycled(),引发Canvas: trying to use a recycled bitmap处理


通过Imageview显示网络传回来的byte数据,发现内存会不断增大,最终导致内存溢出。于是手动去回收Bitmap的数据,发现会main ex (Canvas: trying to use a recycled bitmap)


网上查询下,发现重新Imageview的onDraw时,在super执行try catch,发现解决了问题,这样不必手动bitmap.recycled(),不然视频会闪动.


查询资料:

http://blog.csdn.net/primer_programer/article/details/26697037


Android手动回收bitmapisRecycled(),引发Canvas: trying to use a recycled bitmap处理