private final void decRefsLocked(long id) { if (DEBUG_REFS && mRefStacks != null) { mRefStacks.remove(id); } mNumRefs--; // System.out.println("Dec streams: mNumRefs=" + mNumRefs // + " mReleased=" + mReleased); if (mNumRefs == 0) { destroy(); } }
protected void finalize() throws Throwable { try { if (DEBUG_REFS && mNumRefs != 0) { Log.w(TAG, "AssetManager " + this + " finalized with non-zero refs: " + mNumRefs); if (mRefStacks != null) { for (RuntimeException e : mRefStacks.values()) { Log.w(TAG, "Reference from here", e); } } } destroy(); } finally { super.finalize(); } }