BitmapSoftReference bitmapSoftRef = new SoftReference<Bitmap>();
if(bitmapSoftRef.get() != null){
imageView.setImageBitmap(bitmapSoftRef.get());
}
合适的做法为:
Bitmap bitmap = bitmapSoftRef.get();
if(bitmap != null){
imageView.setImageBitmap(bitmap);
}