Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.util.Log; public class Main { private static final String TAG = "BitmapUtils"; public static void recycleSilently(Bitmap bitmap) { if (bitmap != null) { try { bitmap.recycle(); } catch (Throwable th) { Log.w(TAG, "unable recycle bitmap", th); } } } }