Question

I know that before API 10 of Android, it was important to call recycle() for Bitmaps that aren't used anymore, since the actual raw data is stored in the native memory.

However, as of API 11, Bitmaps are stored in the heap, so my question is:

Is it still needed to call recycle() on Bitmaps if the API is large enough (at least 11)? What does it do if I call it on such API?

Was it helpful?

Solution

Official documentation tells that recycle() now is an advanced call so if you want to free your bitmap you can just write something like bitmap = null and GC will take care of everything else.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top