Android - Bitmap and memory management?

后端 未结 4 856
终归单人心
终归单人心 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条回答
  •  Happy的楠姐
    2020-12-17 17:33

    bitmap.recycle(); release the native heap that is used in bitmaps.And setting it to null is to assist the GC to quickly collect your reference.

提交回复
热议问题