Skip to content
🤔 Documentation issue? Report it

//leakcanary/shark/GcRoot

GcRoot

sealed class GcRoot

A GcRoot as identified by HprofRecord.HeapDumpRecord.GcRootRecord in the heap dump.

Types

Name Summary
Debugger class Debugger(val id: Long) : GcRoot
An object held by a connected debugger
Finalizing class Finalizing(val id: Long) : GcRoot
An object that is in a queue, waiting for a finalizer to run.
InternedString class InternedString(val id: Long) : GcRoot
An interned string, see java.lang.String.intern.
JavaFrame class JavaFrame(val id: Long, val threadSerialNumber: Int, val frameNumber: Int) : GcRoot
A java local variable
JniGlobal class JniGlobal(val id: Long, val jniGlobalRefId: Long) : GcRoot
A global variable in native code.
JniLocal class JniLocal(val id: Long, val threadSerialNumber: Int, val frameNumber: Int) : GcRoot
A local variable in native code.
JniMonitor class JniMonitor(val id: Long, val stackTraceSerialNumber: Int, val stackDepth: Int) : GcRoot
It’s unclear what this is, documentation welcome.
MonitorUsed class MonitorUsed(val id: Long) : GcRoot
Everything that called the wait() or notify() methods, or that is synchronized.
NativeStack class NativeStack(val id: Long, val threadSerialNumber: Int) : GcRoot
Input or output parameters in native code
ReferenceCleanup class ReferenceCleanup(val id: Long) : GcRoot
It’s unclear what this is, documentation welcome.
StickyClass class StickyClass(val id: Long) : GcRoot
A system class
ThreadBlock class ThreadBlock(val id: Long, val threadSerialNumber: Int) : GcRoot
ThreadObject class ThreadObject(val id: Long, val threadSerialNumber: Int, val stackTraceSerialNumber: Int) : GcRoot
A thread.
Unknown class Unknown(val id: Long) : GcRoot
An unknown gc root.
Unreachable class Unreachable(val id: Long) : GcRoot
An object that is unreachable from any other root, but not a root itself.
VmInternal class VmInternal(val id: Long) : GcRoot
It’s unclear what this is, documentation welcome.

Properties

Name Summary
id abstract val id: Long
The object id of the object that this gc root references.

Inheritors

Name
Unknown
JniGlobal
JniLocal
JavaFrame
NativeStack
StickyClass
ThreadBlock
MonitorUsed
ThreadObject
ReferenceCleanup
VmInternal
JniMonitor
InternedString
Finalizing
Debugger
Unreachable