Drawable advantage over bitmap for memory in android

后端 未结 3 1070
你的背包
你的背包 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:08

    In my understanding, Bitmaps are typically better for performance if you don't need to do much image manipulation. However, I have run into memory leaks when I don't manually recycle them. My solution was to write a class to help me manage my images that provides an easy way to recycle all my bitmaps at certain points in my application. It also provides an easy way to reuse already loaded resources (including Drawables).

提交回复
热议问题