Java tutorial
//package com.java2s; import android.graphics.*; public class Main { /** * Garbage recycle * * @throws */ public static void recycle(Bitmap bitmap) { if (bitmap != null && !bitmap.isRecycled()) { // recycle bitmap and assign to null bitmap.recycle(); bitmap = null; } System.gc(); } }