Android examples for Graphics:Bitmap Recycle
recycle Bitmap from ImageView
//package com.java2s; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.widget.ImageView; public class Main { public static void recycleBitmap(ImageView iv) { Drawable d = iv.getDrawable();/*from www . j a va 2 s. c o m*/ if (d instanceof BitmapDrawable) { Bitmap b = ((BitmapDrawable) d).getBitmap(); b.recycle(); } d.setCallback(null); } }