If a plugin holds on to a scenenode reference, and that node is deleted by the user via the UI (or some other plugin deletes it), I assume the reference is still valid (until it’s no longer in use, of course, and garbage collected), but the .isInArtworkTree property just goes false?
If a panel plugin kept a reference to a node across update calls for any number of reasons, it could detect that the .isInArtworkTree and drop the reference.
I’m not 100% sure here; the object that the plugin has hold of is actually a wrapper, not the real thing. @peterflynn / @schenglooi, do either of you have any thoughts here?
Right it’s a wrapper class. Not a Proxy pattern, but a proxy in definition.
I think it is strong reference because it still exists if you delete from the stage. For example, cut an element and then do some other changes and then paste the element. It still exists it’s just not on the artboard.
Yes, I realized it was a silly question in the end.
E.g., when you first create a node, it’s not in the artwork tree. When you remove it from its parent, it’s no longer in the tree. But it’s got to function normally otherwise, q.e.d., it’s a strong reference.