Code example for Bitmap

Methods: isRecycled

0
	//---------------------------------------------- 
	// Get from memory 
	@Override 
	public Bitmap getFromMemory(String key) {
		Bitmap bitmap = super.getFromMemory(key);
		if (bitmap != null && bitmap.isRecycled()) {
			// Good coding should mean this should never happen! 
			DebugLog.d(TAG, "Found recycled bitmap in the cache! Key="+key);
			removeFromMemory(key);
			return null; 
		} 
		 
		return bitmap;
	} 
 
	 
	/************************************************************ 
	 * BitmapWeigher  
	 */ 
	private static class BitmapWeigher implements Weigher<Bitmap> {
		@Override