How does the dominator object may lack references to an object it dominates?

57 views Asked by At

I was going through the documentation of chrome dev tools. On this page on memory analysis it said :

Dominator objects comprise a tree structure, because each object has exactly one dominator. A dominator of an object may lack direct references to an object it dominates, that is, the dominators tree is not a spanning tree of the graph.

I was not able to get it because how did the parent object became a dominator of the child without referencing the child object. I mean somewhere in the code it would have been written like this:

var parent = {child : child}; var child = {name : 'child'};

That is how parent became a dominator of the child.

But now it says that the dominator may lack references to the child. Can anyone give me an example situation for this case.

1

There are 1 answers

0
wOxxOm On

That documentation page doesn't say that it should be a direct parent:

dominator of an object A is an object that exists in every simple path from the root to the object A.

So the dominator may reference other objects that reference the target and thus the condition dominator of an object may lack direct references is true.