c-an
c-an

Reputation: 4100

How can I solve this bitmap memory leak on Android?

I am facing a big problem with Bitmap memory leak.

this is the dump

This memory dump shows the Bitmap never go way but stay in the heap and it causes ARN.

How can I solve this?

This is mostly used in Adapter.

Upvotes: 0

Views: 420

Answers (1)

sonique
sonique

Reputation: 4772

You should call recycle() so the garbage collector can free the memory if you target android device < version 3.0 (API Level 11). Google also recommend to use Glide to manage Bitmap, to abstract complexity.

You can find full reference here

Upvotes: 0

Related Questions