Java tutorial
//package com.java2s; import java.util.List; import android.graphics.Bitmap; public class Main { /** * Safely free all {@link Bitmap} in a bitmap {@link List}. * * @param bmpList * Bitmap list. */ public final static void freeBitmapList(List<Bitmap> bmpList) { if (null != bmpList) { for (Bitmap bmp : bmpList) { if (null != bmp && !bmp.isRecycled()) { bmp.recycle(); } } bmpList.clear(); } } }