Skip to content

Commit

Permalink
Add excluded refs to leak info
Browse files Browse the repository at this point in the history
Fixes square#119

Result:

```
* Excluded Refs:
| Field: android.view.inputmethod.InputMethodManager.mNextServedView
| Field: android.view.inputmethod.InputMethodManager.mServedView
| Field: android.view.inputmethod.InputMethodManager.mServedInputConnection
| Field: android.view.inputmethod.InputMethodManager.mCurRootView
| Field: android.animation.LayoutTransition$1.val$parent
| Field: android.view.textservice.SpellCheckerSession$1.this$0
| Field: android.accounts.AccountManager$AmsTask$Response.this$1
| Field: android.media.MediaScannerConnection.mContext
| Field: android.os.UserManager.mContext
| Field: android.view.Choreographer.FrameDisplayEventReceiver.mMessageQueue
| Static field: android.support.v7.internal.widget.ActivityChooserModel.mActivityChoserModelPolicy
| Static field: android.widget.ActivityChooserModel.mActivityChoserModelPolicy
| Thread:FinalizerWatchdogDaemon| Thread:main| Thread:LeakCanary-Heap-Dump
```
  • Loading branch information
pyricau committed May 18, 2015
1 parent 595b79f commit 892a3e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/squareup/leakcanary/LeakCanary.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ public static String leakInfo(Context context, HeapDump heapDump, AnalysisResult
} else {
info += "* NO LEAK FOUND.\n\n";
}
if (detailed) {
detailedString += "* Excluded Refs:\n" + heapDump.excludedRefs;
}

info += "* Reference Key: "
+ heapDump.referenceKey
+ "\n"
Expand Down

0 comments on commit 892a3e0

Please sign in to comment.