我處於使用for循環下載一組圖像並將其轉換爲位圖圖像的情況。所以爲了避免OutOfMemory錯誤,我試圖回收這個位圖。但不幸的是,我遇到了另一個異常,如"View trying to use a recycled bitmap"
。Diff b/w bitmap.recycle()和位圖= null
但我仍然允許通過使用bitmap=null
來清空已使用的位圖。所以我的問題是,將使我的位圖null
幫助我釋放使用的內存?或者我應該在我的代碼的其他部分提供bitmap.recycle()
?
followin g鏈接提供了更多關於位圖內存管理的信息:http://stackoverflow.com/questions/4959485/bitmap-bitmap-recycle-weakreferences-and-garbage-collection – 2013-09-24 01:15:52