我有返回的方法,Drawable如果它的Bitmap对象被回收,那么它会重新加载。
public Drawable getLogo() {
if(logo == null || Util.isRecycled(logo)) //Util.isRecycled checks - is Drawable's bitmap recycled, if it had so
logo = CacheController.getInstance().getLogo(this);
return logo;
}
但看起来就像在调用bitmap.recycle()它之后bitmap.isRecycled()仍然返回false。我是对的,位图回收过程是异步进行的,还是只是我的代码中的错误?如果是这样,我如何确保Bitmap现在没有回收?