I have created Bitmap like below,
// create bitmap in the below line
Bitmap myBitmap = BitmapFactory.decodeResource(getResources(), R.drawable.googlelogo320x480);
And I have set it to an ImageView.
my questions are: 1> Do I need to explicitly call Bitmap.recycle() on the above Bitmap? 2> If yes then when should I call it? I have tried calling it immediately after the 3rd line i.e, after setting the bitmap to an ImageView, however I get an exception that Canvas trying to draw a recycled Object. 3> Is it going to be a memory leak if recycle() is never called on the Bitmap in my code? P.S: I am working on ICS or above.