in reply to Re: Intercept any changes to the sv_refcnt/SvREFCNT of an object
in thread Intercept any changes to the sv_refcnt/SvREFCNT of an object
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.
|
|---|