Android Bitmap Recycle recycleSilently(Bitmap bitmap)

Here you can find the source of recycleSilently(Bitmap bitmap)

Description

recycle Silently

Declaration

public static void recycleSilently(Bitmap bitmap) 

Method Source Code

//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)
            return;
        try {//ww  w .  j a  v  a 2  s. c om
            bitmap.recycle();
        } catch (Throwable t) {
            Log.w(TAG, "unable recycle bitmap", t);
        }
    }
}

Related

  1. recycleBitmap(Bitmap bitmap)