LeakFilter class sealed

Defines a rule that determines whether an Allocation should be ignored.

Leak filters allow selective suppression of allocations when analyzing leak reports. They are composable, comparable, and automatically simplified when combined.

Filters can be constructed using the provided factory constructors and combined using logical operations:

  • and / & → logical AND
  • or / | → logical OR
  • not → logical NOT
Implementers

Constructors

LeakFilter.ignoreAddresses(Set<int> addresses)
Creates a filter that ignores allocations whose address is contained in addresses.
factory
LeakFilter.ignoreAll()
Creates a filter that ignores all allocations.
const
factory
LeakFilter.ignoreNone()
Creates a filter that ignores no allocations.
const
factory
LeakFilter.ignoreStackContains(Pattern pattern)
Creates a filter that ignores allocations whose stack trace contains pattern.
const
factory
LeakFilter.ignoreTypes(Set<String> types)
Creates a filter that ignores allocations whose type is contained in types.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

and(LeakFilter other) LeakFilter
Returns a filter representing the logical AND of this filter and other.
ignore(Allocation allocation) bool
Returns true if the given allocation should be ignored.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
not() LeakFilter
Returns the logical negation of this filter.
or(LeakFilter other) LeakFilter
Returns a filter representing the logical OR of this filter and other.
toString() String
Returns a human-readable description of this filter.
override

Operators

operator &(LeakFilter other) LeakFilter
Logical AND operator alias for and.
operator ==(Object other) bool
The equality operator.
inherited
operator |(LeakFilter other) LeakFilter
Logical OR operator alias for or.