Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.Bitmap; public class Main { public static void recycleBitmap(Bitmap bitmap) { if (bitmap != null && !bitmap.isRecycled()) { bitmap.recycle(); bitmap = null; System.gc(); } } }