A rule of thumb that I use is, if you cannot see the owner, then you&#x27;re probably focusing too narrowly. For a directed graph, which is a &quot;sea of nodes&quot; with no real ordering, I would have the &quot;graph&quot; object own all its nodes; for an AST, if it is truly a tree, then the parent owns its children, or otherwise see the directed graph case.