Re: [問題] 關於Bitmap recycle

看板java作者 (叔叔你人真好)時間14年前 (2010/05/09 23:18), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串2/2 (看更多)
※ 引述《dreamvic (夢遊夏威夷)》之銘言: : 結果 entry.photo 發生了 : trying to use a recycled bitmap android.graphics.Bitmap : 的exception : 想請問 rawPhoto 被 recycle ,會影響到entry.photo的使用嗎? : 因為程式看來看去只有那地方有寫recycle....系統應該不會主動回收吧?? : 謝謝 API 這樣寫: public static Bitmap createBitmap (Bitmap src) Since: API Level 1 Returns an immutable bitmap from the source bitmap. The new bitmap may be the same object as source, or a copy may have been made. It is initialized with th e same density as the original bitmap. 我覺得你還是用 copy(Bitmap.Config config, boolean isMutable) 來弄一個 Bitmap Object 比較好。 -- 《為了要得到真相,就要向原 PO 伸圖》 那就是伸圖魔人的沒圖沒真相原則,那時我們堅信那就是逼逼死的真實 靠么,圖咧? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.77.99.172

05/09 23:22, , 1F
怎麼辦,覺得簽名檔好點題喔 [逃]
05/09 23:22, 1F

05/09 23:28, , 2F
謝謝^^ 我會試看看
05/09 23:28, 2F
文章代碼(AID): #1Bvj8-ak (java)
討論串 (同標題文章)
文章代碼(AID): #1Bvj8-ak (java)