Java tutorial
//package com.java2s; import android.graphics.Bitmap; public class Main { /** * <pre> * Recycle a {@link Bitmap} object * </pre> * @return true if bitmap was recycled successfully */ public static boolean recycleBitmap(Bitmap bm) { if (bm != null && !bm.isRecycled()) { bm.recycle(); return true; } return false; } }