-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Heap snapshots
The VM service protocol provides access to heap snapshots, a description of all the objects and references in the heap at some point in time. Tools such as Observatory provide analysis and visualization of these snapshots to help developers understand the memory usage of their applications.
The successors of an object are the objects it directly references, such as through an instance variable or an array element.
The predecessors of an object are the objects that directly reference it.
In a heap dominator tree, an object X is a parent of object Y if every path from the root to Y goes through X. This allows you to find "choke points" that are holding onto a lot of memory. If an object becomes garbage, all its children in the dominator tree become garbage as well.
An object X is said to "own" object Y if X is the only object that references Y, or X owns the only object that references Y. In particular, objects "own" the space of any unshared lists or maps they reference.
Important
The wiki has moved to https://github.com/dart-lang/sdk/tree/main/docs; please don't edit the pages here.