As an alternative to BrowserUk's approach of using an array, I've used a Foo::Graph object that holds all entities (nodes, edges) currently relevant. Each node and edge holds weak references to the connected nodes and edges, and it is responsibility of the user to hold onto the Foo::Graph object as long as any Foo::Edge or Foo::Node object is used somewhere. This is also not ideal, but might give you another idea.
In reply to Re^2: Intercept any changes to the sv_refcnt/SvREFCNT of an object
by Corion
in thread Intercept any changes to the sv_refcnt/SvREFCNT of an object
by vernonlyon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |