Skip to content
🤔 Documentation issue? Report it

Shark

shark / shark

Package shark

Types

Name Summary
ApplicationLeak data class ApplicationLeak :Leak
A leak found by HeapAnalyzer in your application.
AppSingletonInspector class AppSingletonInspector :ObjectInspector
Inspector that automatically marks instances of the provided class names as not leaking because they’re app wide singletons.
HeapAnalysis sealed class HeapAnalysis :Serializable
The result of an analysis performed by HeapAnalyzer, either a HeapAnalysisSuccess or a HeapAnalysisFailure. This class is serializable however there are no guarantees of forward compatibility.
HeapAnalysisFailure data class HeapAnalysisFailure :HeapAnalysis
The analysis performed by HeapAnalyzer did not complete successfully.
HeapAnalysisSuccess data class HeapAnalysisSuccess :HeapAnalysis
The result of a successful heap analysis performed by HeapAnalyzer.
HeapAnalyzer class HeapAnalyzer
Analyzes heap dumps to look for leaks.
IgnoredReferenceMatcher class IgnoredReferenceMatcher :ReferenceMatcher
IgnoredReferenceMatcher should be used to match references that cannot ever create leaks. The shortest path finder will never go through matching references.
Leak sealed class Leak :Serializable
A leak found by HeapAnalyzer, either an ApplicationLeak or a LibraryLeak.
LeakNodeStatus enum class LeakNodeStatus
LeakReference data class LeakReference :Serializable
A single field in a LeakTraceElement.
LeakTrace data class LeakTrace :Serializable
A chain of references that constitute the shortest strong reference path from a GC root to the leaking object. Fixing the leak usually means breaking one of the references in that chain.
LeakTraceElement data class LeakTraceElement :Serializable
LibraryLeak data class LibraryLeak :Leak
A leak found by HeapAnalyzer, where the only path to the leaking object required going through a reference matched by pattern, as provided to a LibraryLeakReferenceMatcher instance. This is a known leak in library code that is beyond your control.
LibraryLeakReferenceMatcher data class LibraryLeakReferenceMatcher :ReferenceMatcher
LibraryLeakReferenceMatcher should be used to match references in library code that are known to create leaks and are beyond your control. The shortest path finder will only go through matching references after it has exhausted references that don’t match, prioritizing finding an application leak over a known library leak. Library leaks will be reported as LibraryLeak instead of ApplicationLeak.
ObjectInspector interface ObjectInspector
Provides LeakCanary with insights about objects (classes, instances and arrays) found in the heap. inspect will be called for each object that LeakCanary wants to know more about. The implementation can then use the provided ObjectReporter to provide insights for that object.
ObjectInspectors enum class ObjectInspectors :ObjectInspector
A set of default ObjectInspectors that knows about common JDK objects.
ObjectReporter class ObjectReporter
Enables ObjectInspector implementations to provide insights on heapObject, which is an object (class, instance or array) found in the heap.
OnAnalysisProgressListener interface OnAnalysisProgressListener
Reports progress from the HeapAnalyzer as they occur, as Step values.
ReferenceMatcher sealed class ReferenceMatcher
Used to pattern match known patterns of references in the heap, either to ignore them (IgnoredReferenceMatcher) or to mark them as library leaks (LibraryLeakReferenceMatcher).
ReferencePattern sealed class ReferencePattern :Serializable
A pattern that will match references for a given ReferenceMatcher.

Exceptions

Name Summary
HeapAnalysisException class HeapAnalysisException :RuntimeException