Example usage for android.graphics Bitmap recycle

List of usage examples for android.graphics Bitmap recycle

Introduction

In this page you can find the example usage for android.graphics Bitmap recycle.

Prototype

public void recycle() 

Source Link

Document

Free the native object associated with this bitmap, and clear the reference to the pixel data.

Usage

From source file:Main.java

public static void recycle(Bitmap bitmap) {
    if (bitmap != null && !bitmap.isRecycled()) {
        bitmap.recycle();
    }//from   ww  w  .j  av a 2 s.co m
}

From source file:Main.java

/**
 * <pre>/*from  w w w. ja v a2s.c  o  m*/
 * Recycle a {@link Bitmap} object
 * </pre>
 * @return true if bitmap was recycled successfully
 */
public static boolean recycleBitmap(Bitmap bm) {
    if (bm != null && !bm.isRecycled()) {
        bm.recycle();
        return true;
    }
    return false;
}

From source file:Main.java

public static void recycle(Bitmap bitmap) {
    if (null != bitmap && !bitmap.isRecycled())
        bitmap.recycle();
    bitmap = null;/*w w w . j a v  a2 s  .co m*/
    System.gc();
}

From source file:Main.java

private static void recycleBitmap(Bitmap bitmap) {
    if (null != bitmap && !bitmap.isRecycled()) {
        bitmap.recycle();
        bitmap = null;/*from  www  .  j a va  2  s .  c om*/
    }
}

From source file:Main.java

public static void recycleBitmap(Bitmap bitmap) {
    if (bitmap != null && !bitmap.isRecycled()) {
        bitmap.recycle();
        bitmap = null;//from  ww w .  j  av a2  s.  com
    }
}

From source file:Main.java

public static void recycleBitmap(Bitmap bitmap) {
    if (bitmap != null && !bitmap.isRecycled()) {
        bitmap.recycle();
        System.gc();/*w ww. j a  va2  s  . c o  m*/
    }
}

From source file:Main.java

public static void recycleBitmap(Bitmap bitmap) {
    if (bitmap != null && bitmap.isRecycled()) {
        bitmap.recycle();
        bitmap = null;// www .j  a va  2  s  .  c  o  m
    }
}

From source file:Main.java

public static void releaseBitmap(Bitmap bitmap) {
    if (null != bitmap && !bitmap.isRecycled()) {
        bitmap.recycle();
        bitmap = null;/* w  w  w  . java 2  s. c  om*/
    }
}

From source file:Main.java

public static void destory(Bitmap bitmap) {
    if (null != bitmap && !bitmap.isRecycled()) {
        bitmap.recycle();
        bitmap = null;/*  w  ww .  j ava  2s . c  o m*/
    }
}

From source file:Main.java

public static void recyleBitmap(Bitmap bitmap) {
    if (bitmap != null && !bitmap.isRecycled()) {
        bitmap.recycle();
        System.gc();//from  w  w w .  j  av  a2 s.  com
    }
}