I'd also like to ask about the lifetime of a Graph (Global) variable. It seems that global variables persist even if nodes that created them are deleted from the graph.
For example, if I:
- Drop an Attribute Create TOP and create a string global variable named
foo
and set it to bar
.
- Cook this node.
- Delete it.
- Drop another Attribute Create TOP, create a string attribute named
dar
(of any scope) and set its value to `@foo`
.
Then even though there is nothing in the graph that creates the
foo=bar
attribute, it will still be available and its value will be pulled from thin air. As a result, the value of
dar
becomes
bar
. This persists between hipfile reloads.
I can delete a global variable by temporarily creating an Attribute Delete TOP, piping it to anything and cooking it. Afterwards this node can be removed. This is very counterintuitive and extraordinary, which brings me to a question: is this behavior intentional? Why do global variables live on without the nodes that created them?