public final class HeapAnalyzer
extends java.lang.Object
RefWatcher to verify if suspected leaks are real.| Constructor and Description |
|---|
HeapAnalyzer(com.squareup.leakcanary.ExcludedRefs excludedRefs)
Deprecated.
|
HeapAnalyzer(com.squareup.leakcanary.ExcludedRefs excludedRefs,
AnalyzerProgressListener listener,
java.util.List<java.lang.Class<? extends com.squareup.leakcanary.Reachability.Inspector>> reachabilityInspectorClasses) |
| Modifier and Type | Method and Description |
|---|---|
AnalysisResult |
checkForLeak(java.io.File heapDumpFile,
java.lang.String referenceKey)
Deprecated.
Use
checkForLeak(File, String, boolean) instead. |
AnalysisResult |
checkForLeak(java.io.File heapDumpFile,
java.lang.String referenceKey,
boolean computeRetainedSize)
Searches the heap dump for a
KeyedWeakReference instance with the corresponding key,
and then computes the shortest strong reference path from that instance to the GC roots. |
java.util.List<TrackedReference> |
findTrackedReferences(java.io.File heapDumpFile) |
@Deprecated
public HeapAnalyzer(@NonNull
com.squareup.leakcanary.ExcludedRefs excludedRefs)
HeapAnalyzer(ExcludedRefs, AnalyzerProgressListener, List).public HeapAnalyzer(@NonNull
com.squareup.leakcanary.ExcludedRefs excludedRefs,
@NonNull
AnalyzerProgressListener listener,
@NonNull
java.util.List<java.lang.Class<? extends com.squareup.leakcanary.Reachability.Inspector>> reachabilityInspectorClasses)
@NonNull public java.util.List<TrackedReference> findTrackedReferences(@NonNull java.io.File heapDumpFile)
@Deprecated @NonNull public AnalysisResult checkForLeak(@NonNull java.io.File heapDumpFile, @NonNull java.lang.String referenceKey)
checkForLeak(File, String, boolean) instead.checkForLeak(File, String, boolean) with computeRetainedSize set to true.@NonNull public AnalysisResult checkForLeak(@NonNull java.io.File heapDumpFile, @NonNull java.lang.String referenceKey, boolean computeRetainedSize)
KeyedWeakReference instance with the corresponding key,
and then computes the shortest strong reference path from that instance to the GC roots.