看recycle方法的注釋就好了立莉,Google的注釋總不會(huì)騙人遣耍。
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)確定不用時(shí)調(diào)用。這是個(gè)高級(jí)用法,一般沒必要調(diào)用,因?yàn)槠胀ǖ腉C進(jìn)程會(huì)在bitmap沒有引用時(shí)釋放內(nèi)存。
Android中有沒有必要調(diào)用Bitmap的recycle()在Android應(yīng)用里华嘹,最耗費(fèi)內(nèi)存的就是圖片資源。而且在Android系統(tǒng)中法竞,讀取位圖Bitmap時(shí)耙厚,分給虛擬機(jī)中的圖片的堆棧大小只有8M,如果超出了岔霸,就會(huì)出現(xiàn)OutOfMe...