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

/**
 * Recycle a Bitmap resource, but need to set null outside
 *//*from   ww  w .  j a v  a 2  s . c o m*/
public static void recycleBitmap(Bitmap bitmap) {
    bitmap.recycle();
    System.gc();
}

From source file:Main.java

public static void BitmapRecyle(Bitmap bitmap) {
    bitmap.recycle();
    bitmap = null;
    System.gc();
}

From source file:Main.java

/**
 * Clears all Bitmap data, that is, recycles the Bitmap and 
 * triggers the garbage collection./* w  ww  . j a v a 2 s  .  co  m*/
 * 
 * @param bm
 */
public static void clearBitmap(Bitmap bm) {
    bm.recycle();
    System.gc();
}

From source file:Main.java

private static void recycleBitmap(Bitmap paramBitmap) {
    paramBitmap.recycle();
    System.gc();
}

From source file:Main.java

public static void recycle(Bitmap bitmap) {
    if (bitmap != null)
        bitmap.recycle();
}

From source file:Main.java

public static void recycleBitmap(Bitmap bm) {
    if (bm != null) {
        bm.recycle();
        bm = null;/*from   ww w .j  ava2 s  .c o  m*/
        System.gc();
    }
}

From source file:Main.java

public static void recycleBitmap(Bitmap bitmap) {
    if (bitmap != null) {
        bitmap.recycle();
        System.gc();/*from ww  w.ja v a  2 s .c  o m*/
    }
}

From source file:Main.java

public static void recycle(Bitmap bitmap) {
    if (bitmap != null) {
        bitmap.recycle();
        bitmap = null;
    }
}

From source file:Main.java

public static void recycleBitmap(Bitmap bp) {
    if (bp != null && !bp.isRecycled()) {
        bp.recycle();
        bp = null;//  w  w w.jav  a  2 s. co m
    }
}

From source file:Main.java

private static void recoverBitmap(Bitmap bm) {
    if (bm != null && !bm.isRecycled()) {
        bm.recycle();
    }//  w  w  w  . j av  a  2  s .  com
    bm = null;
}