//leakcanary-repo/shark/AndroidReferenceMatchers
AndroidReferenceMatchers¶
[jvm]\ enum AndroidReferenceMatchers : Enum<AndroidReferenceMatchers> , ReferenceMatcher.ListBuilder
AndroidReferenceMatchers values add ReferenceMatcher instances to a global list via their add method. A ReferenceMatcher is either a IgnoredReferenceMatcher or a LibraryLeakReferenceMatcher.
AndroidReferenceMatchers is used to build the list of known references that cannot ever create leaks (via IgnoredReferenceMatcher) as well as the list of known leaks in the Android Framework and in manufacturer specific Android implementations.
This class is a work in progress. You can help by reporting leak traces that seem to be caused by the Android SDK, here: https://github.com/square/leakcanary/issues/new
We filter on SDK versions and Manufacturers because many of those leaks are specific to a given manufacturer implementation, they usually share their builds across multiple models, and the leaks eventually get fixed in newer versions.
Most app developers should use appDefaults. However, you can also use a subset of AndroidReferenceMatchers by creating an EnumSet that matches your needs and calling buildKnownReferences.
Entries¶
Types¶
Name | Summary |
---|---|
Companion | [jvm] object Companion |
Functions¶
Name | Summary |
---|---|
add | [jvm] abstract fun add(references: MutableList<ReferenceMatcher>) |
valueOf | [jvm] fun valueOf(value: String): AndroidReferenceMatchers Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.) |
values | [jvm] fun values(): Array<AndroidReferenceMatchers> Returns an array containing the constants of this enum type, in the order they’re declared. |
Properties¶
Name | Summary |
---|---|
name | [jvm] val name: String |
ordinal | [jvm] val ordinal: Int |