コード例 #1
0
 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();
   }
 }
コード例 #2
0
 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();
   }
 }