Drawable advantage over bitmap for memory in android

后端 未结 3 1019
你的背包
你的背包 2020-12-31 10:42

This question is linked with the answers in the following question:

Error removing Bitmaps[Android]

Is there any advantage of using Drawable over Bitmap in A

3条回答
  •  無奈伤痛
    2020-12-31 11:10

    You don't need to call Bitmap.reycle(). This will be done for you in its finalizer. Doing it in the finalizer means the allocation will be delayed until finalizers run, so when possible directly calling recycle() can help with memory management.

提交回复
热议问题