Object Dominators
class ObjectDominators
Exposes high level APIs to compute and render a dominator tree. This class needs to be public to be used by other LeakCanary modules but is internal and its API might change at any moment.
Note that the exposed APIs are not optimized for speed, memory or IO.
Eventually this capability should become part of the Shark public APIs, please open an issue if you'd like to use this directly.
Types
Link copied to clipboard
data class DominatorNode(val shallowSize: Int, val retainedSize: Int, val retainedCount: Int, val dominatedObjectIds: List<Long>) : Serializable
Link copied to clipboard
data class OfflineDominatorNode(val node: ObjectDominators.DominatorNode, val name: String) : Serializable
Functions
Link copied to clipboard
fun buildDominatorTree(graph: HeapGraph, ignoredRefs: List<IgnoredReferenceMatcher>): Map<Long, ObjectDominators.DominatorNode>
Link copied to clipboard
fun buildOfflineDominatorTree(graph: HeapGraph, ignoredRefs: List<IgnoredReferenceMatcher>): Map<Long, ObjectDominators.OfflineDominatorNode>
Link copied to clipboard
fun renderDominatorTree(graph: HeapGraph, ignoredRefs: List<IgnoredReferenceMatcher>, minRetainedSize: Int, threadName: String? = null, printStringContent: Boolean = false): String