List of usage examples for android.graphics Bitmap isRecycled
public final boolean isRecycled()
From source file:Main.java
public static boolean canUse(Bitmap bmp) { return bmp != null && !bmp.isRecycled(); }
From source file:Main.java
/** * Recycle the bitmp if it is not null or recycled. * /*w w w . j a v a2s.c om*/ * @param bmp * the bitmap will be recycled for retrieving its memory */ public static void recycleBitmap(Bitmap bmp) { if (bmp == null || bmp.isRecycled()) return; // if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { bmp.recycle(); // } }
From source file:Main.java
/** * whether bitmap is null or is recycled * /* w w w . ja v a 2 s . c om*/ * @param bitmap */ public static boolean isEmty(Bitmap bitmap) { if (bitmap == null || bitmap.isRecycled()) { return true; } return false; }
From source file:Main.java
/** * //from w ww . j a v a 2s. c om * @param bitmap */ private static void recycleBitmap(Bitmap bitmap) { if (bitmap != null && !bitmap.isRecycled()) { bitmap.recycle(); bitmap = null; } }
From source file:Main.java
/** * Recycle the bitmap with null checks./*from w w w . j av a2 s . c o m*/ * If the bitmap is already recycled, do nothing. * * @param bitmap to recycle. */ public static void recycle(Bitmap bitmap) { if (bitmap == null || bitmap.isRecycled()) { return; } bitmap.recycle(); }
From source file:Main.java
/** * recycle bitmap/*www.j a v a2 s .c o m*/ * * @param bitmap */ public static void recycle(Bitmap bitmap) { if (null == bitmap || bitmap.isRecycled()) { return; } bitmap.recycle(); bitmap = null; }
From source file:Main.java
public static void recycleBitmap(Bitmap mBitmap) { if (mBitmap != null && !mBitmap.isRecycled()) { mBitmap.recycle();//from ww w .j av a 2s.c om mBitmap = null; System.gc(); System.runFinalization(); System.gc(); } }
From source file:Main.java
/** * Garbage recycle//from ww w . j av a 2s.co m * * @throws */ public static void recycle(Bitmap bitmap) { if (bitmap != null && !bitmap.isRecycled()) { // recycle bitmap and assign to null bitmap.recycle(); bitmap = null; } System.gc(); }
From source file:Main.java
public static void recycleBitmap(Bitmap decodeFile) { if (decodeFile != null && !decodeFile.isRecycled()) { decodeFile.recycle();// w ww . ja v a 2 s .co m decodeFile = null; System.gc(); } }
From source file:Main.java
public static boolean isValidBitmap(Bitmap map) { if (map != null) { if (!map.isRecycled()) { return true; }//from w w w . j a v a 2s. co m } return false; }