看recycle方法的注釋就好了,Google的注釋總不會騙人攒射。
This operation cannot be reversed, so it should only be called if you are sure there are no further uses for the bitmap. This is an advanced call, and normally need not be called, since the normal GC process will free up this memory when there are no more references to this bitmap.
操作不能撤銷,只應(yīng)確定不用時調(diào)用折汞。這是個高級用法,一般沒必要調(diào)用盖腿,因為普通的GC進(jìn)程會在bitmap沒有引用時釋放內(nèi)存爽待。
Android中有沒有必要調(diào)用Bitmap的recycle()在Android應(yīng)用里,最耗費(fèi)內(nèi)存的就是圖片資源翩腐。而且在Android系統(tǒng)中鸟款,讀取位圖Bitmap時,分給虛擬機(jī)中的圖片的堆棧大小只有8M茂卦,如果超出了欠雌,就會出現(xiàn)OutOfMe...