Android - Bitmap and memory management?

后端 未结 4 848
终归单人心
终归单人心 2020-12-17 16:56

I\'ve seen in a lot of samples, that developers call recycle() on bitmap, and then set it to null. Why is this necessary, doesn\'t the garbage coll

4条回答
  •  伪装坚强ぢ
    2020-12-17 17:21

    This article from android development docs has a lot of information on this topic. While you're at it also check the article about caching if you'll be using multiple bitmaps.

提交回复
热议问题