main

square/leakcanary

Last updated at: 29/12/2023 09:39

GcRootProvider.kt

TLDR

The GcRootProvider interface in the file GcRootProvider.kt provides a method for obtaining a sequence of GC Roots to traverse the graph from, in a stable order.

Methods

provideGcRoots

This method takes a HeapGraph object as a parameter and returns a sequence of GcRootReference objects. It is responsible for providing the GC Roots to traverse the graph from, ideally in a stable order.

Classes

None

package shark

interface GcRootProvider {
  /**
   * Provides a sequence of GC Roots to traverse the graph from, ideally in a stable order.
   */
  fun provideGcRoots(graph: HeapGraph): Sequence<GcRootReference>
}