Question about the Bitmap utility for Android, do I need to support all Bitmap links in order to invoke the recycling method?

Often we get the image from the server as a stream of bytes, then create a Bitmap and assign it to an ImageView object.

When I need to free up memory, I can drop all ImageView references to null, letting gc do the work.

But the question is that I did not call the Bitmap rewrite method, since I did not use links to it. So I'm wondering if I need to support all Bitmap links in order to recycle them in the future?

+1
source share
2 answers

No, you won’t need it, GC will do it for you.

+4
source

, Bitmap GC ( ).

ImageView,

Recycle ImageView

0

All Articles