我需要将一个数据对象放入包含软引用的弱哈希图中。如何将我的“可绘制”对象转换为软引用?
WeakHashMap <String, SoftReference<Drawable>> tempPulled = new WeakHashMap<String, SoftReference<Drawable>>();
Drawable pulled = BitmapDrawable.createFromResourceStream(null, null, conn.getInputStream(), "galleryImage", options);
SoftReference<Drawable> sPulled;
tempPulled.put(id, pulled);
tempPulled 应该是 "sPulled" ,即软引用