Java tutorial
//package com.java2s; import android.graphics.drawable.BitmapDrawable; import android.widget.ImageView; public class Main { public static void releaseImageView(ImageView imageView) { if (imageView != null) { BitmapDrawable bitmapDrawable = (BitmapDrawable) (imageView.getDrawable()); if (bitmapDrawable != null) { bitmapDrawable.setCallback(null); } imageView.setImageBitmap(null); } } }