xuxiuxi
2017-08-11 053bef92d3ad2caa71d66ce0817bae51f7e2a64e
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/util/bitmap/MemoryCacheUtils.java
@@ -13,8 +13,6 @@
 */
public class MemoryCacheUtils {
//    private HashMap<String, SoftReference<Bitmap>> mMemoryCache = new
//    HashMap<String, SoftReference<Bitmap>>();
   private LruCache<String, Bitmap> mMemoryCache;
   public MemoryCacheUtils() {
@@ -34,11 +32,6 @@
    * @param url
    */
   public Bitmap getBitmapFromMemory(String url) {
      // SoftReference<Bitmap> softReference = mMemoryCache.get(url);
      // if (softReference != null) {
      // Bitmap bitmap = softReference.get();
      // return bitmap;
      // }
      return mMemoryCache.get(url);
   }
@@ -49,9 +42,6 @@
    * @param bitmap
    */
   public void setBitmapToMemory(String url, Bitmap bitmap) {
//       SoftReference<Bitmap> softReference = new
//       SoftReference<Bitmap>(bitmap);
//       mMemoryCache.put(url, softReference);
      mMemoryCache.put(url, bitmap);
   }
}