[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RFC: Proposal: Deterministic Object Destruction

Rick Johnson <rantingrickjohnson at gmail.com> writes:
> ...
> Can you provide a real world example in which you need an
> object which circularly references _itself_?

Circular structures occur in real life.

One example are tracebacks (which are very helpful for debugging
reasons). Keeping a traceback in a variable can easily introduce
a cycle.

Another example is a tree structure where you need both efficient
access to children and ancestors of a node (see the DOM standard).