Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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();
        }
    }
}