Re: [問題] 關於Bitmap recycle
※ 引述《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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):