Which command to clear memory on Android

Asked

Viewed 140 times

1

I am using Imageview which are called by buttons to load the image fills the memory by stating this error java.lang.Outofmemoryerror would have a command that would clear the memory.

1 answer

3


When you upload the images, use the code below:

((BitmapDrawable) yourImageView.getDrawable()).getBitmap().recycle();
  • still not solved, you would not know how to carry only one image in memory at a time.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.