<div dir="auto"><div>Thanks, makes sense. Andreas<br><br><div data-smartmail="gmail_signature">---on the phone---</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 12, 2022, 5:35 AM Patrick Dähne <<a href="mailto:pdaehne@gmail.com" target="_blank" rel="noreferrer">pdaehne@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> Here is one last clarification. After all occurrences of a node are removed from a scene, can it still be readded as a USE, named node ? It appears so. In SAI terms, getNamedNode() does not rely on if a node is currently used in a scene ?<br>
> <br>
> That means a named node may never be released from memory.<br>
> <br>
> But unnaming such an unlinked node with removeNamedNode should make it safe to remove from memory ?<br>
<br>
A node gets garbage collected when<br>
<br>
a) it is no longer part of the scene graph, i.e. it is not a root node of a live scene, and it is not contained in the field of another live node, and<br>
<br>
b) there is no reference from user code (either externally or in a Script node) to the node.<br>
<br>
ROUTEs do not prevent nodes from getting garbage collected, as well as DEF names.<br>
<br>
To answer your questions:<br>
<br>
- You can re-add a node, because you still have a reference to it in your user code.<br>
<br>
- A named node gets released from memory when it is no longer part of the scene graph and there is no reference to it in your user code.<br>
<br>
Bye,<br>
<br>
Patrick<br>
<br>
</blockquote></div></div></div>