leakcanary-android-release / leakcanary / HeapAnalysisConfig

HeapAnalysisConfig

data class HeapAnalysisConfig

Constructors

NameSummary
<init>HeapAnalysisConfig(referenceMatchers: List<ReferenceMatcher> = AndroidReferenceMatchers.appDefaults, objectInspectors: List<ObjectInspector> = AndroidObjectInspectors.appDefaults, metadataExtractor: MetadataExtractor = AndroidMetadataExtractor, computeRetainedHeapSize: Boolean` = true, leakingObjectFinder: LeakingObjectFinder = FilteringLeakingObjectFinder(
AndroidObjectInspectors.appLeakingObjectFilters

), stripHeapDump: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) = false)` |

Properties

NameSummary
computeRetainedHeapSizeval computeRetainedHeapSize: Boolean
Whether to compute the retained heap size, which is the total number of bytes in memory that would be reclaimed if the detected leaks didn't happen. This includes native memory associated to Java objects (e.g. Android bitmaps).
leakingObjectFinderval leakingObjectFinder: LeakingObjectFinder
Finds the objects that are leaking, for which LeakCanary will compute leak traces.
metadataExtractorval metadataExtractor: MetadataExtractor
Extracts metadata from a hprof to be reported in shark.HeapAnalysisSuccess.metadata. Called on a background thread during heap analysis.
objectInspectorsval objectInspectors: List<ObjectInspector>
List of ObjectInspector that provide LeakCanary with insights about objects found in the heap. You can create your own ObjectInspector implementations, and also add a shark.AppSingletonInspector instance created with the list of internal singletons.
referenceMatchersval referenceMatchers: List<ReferenceMatcher>
Known patterns of references in the heap, added here either to ignore them (IgnoredReferenceMatcher) or to mark them as library leaks (LibraryLeakReferenceMatcher).
stripHeapDumpval stripHeapDump: Boolean
Whether the first step after a heap dump should be to replace the content of all arrays with zeroes. This increases the overall processing time but limits the amount of time the heap dump exists on disk with potential PII.