Java tutorial
//package com.java2s; //License from project: Open Source License import android.graphics.Bitmap; public class Main { public static void recycle(Bitmap bitmap) { if (bitmap == null) return; if (bitmap.isRecycled()) return; bitmap.recycle(); bitmap = null; } }