Java tutorial
//package com.java2s; import android.graphics.Bitmap; public class Main { public static void recycleBitmaps(Bitmap bitmaps[]) { if (bitmaps != null) { for (Bitmap b : bitmaps) { recycleBitmap(b); } bitmaps = null; } } public static void recycleBitmap(Bitmap b) { if (b != null && !b.isRecycled()) { b.recycle(); b = null; } } }