Skip to content
🤔 Documentation issue? Report it

//leakcanary/leakcanary/LeakCanary/Config/referenceMatchers

referenceMatchers

val 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).

When adding your own custom LibraryLeakReferenceMatcher instances, you’ll most likely want to set LibraryLeakReferenceMatcher.patternApplies with a filter that checks for the Android OS version and manufacturer. The build information can be obtained by calling shark.AndroidBuildMirror.fromHeapGraph.

Defaults to AndroidReferenceMatchers.appDefaults