//leakcanary-android-core/leakcanary/EventListener/Event

Event

[androidJvm]
sealed class Event : Serializable

Note: Event is Serializable for convenience but we currently make no guarantee that the Serialization is backward / forward compatible across LeakCanary versions, so plan accordingly. This is convenient for passing events around processes, and shouldn't be used to store them.

Types

NameSummary
DumpingHeap[androidJvm]
class DumpingHeap(uniqueId: String) : EventListener.Event
Sent from the “LeakCanary-Heap-Dump” HandlerThread.
HeapAnalysisDone[androidJvm]
sealed class HeapAnalysisDone<T : HeapAnalysis> : EventListener.Event
Sent from the thread performing the analysis.
HeapAnalysisProgress[androidJvm]
class HeapAnalysisProgress(uniqueId: String, step: OnAnalysisProgressListener.Step, progressPercent: Double) : EventListener.Event
progressPercent is a value between 0..1
HeapDump[androidJvm]
class HeapDump(uniqueId: String, file: File, durationMillis: Long, reason: String) : EventListener.Event
Sent from the “LeakCanary-Heap-Dump” HandlerThread.
HeapDumpFailed[androidJvm]
class HeapDumpFailed(uniqueId: String, exception: Throwable, willRetryLater: Boolean) : EventListener.Event
Sent from the “LeakCanary-Heap-Dump” HandlerThread.

Properties

NameSummary
uniqueId[androidJvm]
val uniqueId: String
Unique identifier for a related chain of event. The identifier for the events that run before HeapDump gets reset right before HeapDump is sent.

Inheritors

Name
DumpingHeap
HeapDump
HeapDumpFailed
HeapAnalysisProgress
HeapAnalysisDone