Detaching children from a node

When you detach a child from a node, does the child spatial stay in memory? I know it does if it saved to a variable, but I have a situation where I have



node.attachChild(sphere.clone());



If I did node.detachAllChildren(), will the instance of “sphere.clone()” be stored in memory still or deleted?



I apologise if this is trivial!



Ed

Normal java behavior. So you keep the spatial as long as you reference it. If you don’t and detach it then its being GC’d.

yh, so detach it, and set all references to null