Package leakcanary
Types
Link copied to clipboard
class BackgroundTrigger( application: Application, analysisClient: HeapAnalysisClient, analysisExecutor: Executor, processInfo: ProcessInfo = ProcessInfo.Real, analysisCallback: (HeapAnalysisJob.Result) -> Unit = { result ->
SharkLog.d { "$result" }
})
Content copied to clipboard
Link copied to clipboard
class ConditionalInterceptor(delegate: HeapAnalysisInterceptor, evaluateCondition: (HeapAnalysisJob) -> Boolean) : HeapAnalysisInterceptor
Content copied to clipboard
An interceptor that runs only when evaluateCondition returns true.
Link copied to clipboard
Link copied to clipboard
class HeapAnalysisClient( heapDumpDirectoryProvider: () -> File, config: HeapAnalysisConfig, interceptors: List<HeapAnalysisInterceptor>)
Content copied to clipboard
Link copied to clipboard
data class HeapAnalysisConfig( val referenceMatchers: List<ReferenceMatcher> = AndroidReferenceMatchers.appDefaults, val objectInspectors: List<ObjectInspector> = AndroidObjectInspectors.appDefaults, val metadataExtractor: MetadataExtractor = AndroidMetadataExtractor, val computeRetainedHeapSize: Boolean = true, val leakingObjectFinder: LeakingObjectFinder = FilteringLeakingObjectFinder(
AndroidObjectInspectors.appLeakingObjectFilters
), val stripHeapDump: Boolean = false)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
A HeapAnalysisJob represents a single prepared request to analyze the heap. It cannot be executed twice.
Link copied to clipboard
In memory store that can be used to store objects in a given HeapAnalysisJob instance. This is a simple MutableMap of String to Any, but with unsafe generics access.
Link copied to clipboard
class MinimumDiskSpaceInterceptor( application: Application, minimumDiskSpaceBytes: Long, processInfo: ProcessInfo = ProcessInfo.Real) : HeapAnalysisInterceptor
Content copied to clipboard
Link copied to clipboard
class MinimumElapsedSinceStartInterceptor(minimumElapsedSinceStartMillis: Long = TimeUnit.SECONDS.toMillis(30), processInfo: ProcessInfo = ProcessInfo.Real) : HeapAnalysisInterceptor
Content copied to clipboard
Link copied to clipboard
class MinimumMemoryInterceptor( application: Application, minimumRequiredAvailableMemoryBytes: Long, processInfo: ProcessInfo = ProcessInfo.Real) : HeapAnalysisInterceptor
Content copied to clipboard
Link copied to clipboard
class OncePerPeriodInterceptor(application: Application, periodMillis: Long = TimeUnit.DAYS.toMillis(1)) : HeapAnalysisInterceptor
Content copied to clipboard
Proceeds once per period (of time) and then cancels all follow up jobs until period has passed.
Link copied to clipboard
Link copied to clipboard
class SaveResourceIdsInterceptor(resources: Resources) : HeapAnalysisInterceptor
Content copied to clipboard
Interceptor that saves the names of R.id.* entries and their associated int values to a static field that can then be read from the heap dump.
Link copied to clipboard
class ScreenOffTrigger( application: Application, analysisClient: HeapAnalysisClient, analysisExecutor: Executor, analysisCallback: (HeapAnalysisJob.Result) -> Unit = { result ->
SharkLog.d { "$result" }
})
Content copied to clipboard