Skip to content

Retainers and dominators

In a heap snapshot, select an object instance → Retainers tab shows why it’s alive.

Window / global
└── leakStore (Array)
└── (elements)
└── Object @12345 ← your leaked instance

Read bottom-up: the leaf is the victim; the top is the root keeping it alive.

Dominator tree — if you removed this object, which other objects would become unreachable?

High retained size + small shallow size = likely collection holding many children (array of DOM nodes, cache Map).

flowchart BT
  obj[Leaked Object]
  arr[Array cache]
  global[global]
  obj --> arr
  arr --> global
Term Meaning
Shallow size Object’s own bytes
Retained size Bytes freed if object is removed

Sort by Retained size to find the biggest wins.

Search snapshot for your domain object (UserSession, ChartWidget). One retained instance is normal; monotonic instance count under repeated actions is the leak.