public ZombieDrawable(String url, BitmapDrawable drawable) { super(drawable); mUrl = url; mAllCache.add(drawable); mDeadCache.remove(url); mLiveCache.put(url, this); }
@Override protected void finalize() throws Throwable { super.finalize(); if (!mHeadshot) mDeadCache.put(mUrl, mDrawable); mAllCache.remove(mDrawable); mLiveCache.remove(mUrl); clog("Zombie GC event " + mUrl); }
@Override protected void finalize() throws Throwable { super.finalize(); mDeadCache.put(mUrl, mDrawable); mAllCache.remove(mDrawable); mLiveCache.remove(mUrl); if (Constants.LOG_ENABLED) Log.i(Constants.LOGTAG, "Zombie GC event"); System.gc(); }