[osg-users] How to delete Node from the root

LUO Jianguo luojianguo at tsinghua.org.cn
Fri Jul 24 05:20:13 PDT 2015


Hi,

I use addchild to create root tree.
Yeah, we can use removechild to pruning. But the removed node is still in the memory.
I wonder how i can delete it totally from the memory.
We can get any node using computeIntersections(x,y,intersections).
We got the osg::Node *node, then free(node), the node is null. but we new many kinds of objects when new node, e.g., osg::Image> image, <osg::Texture2D> texture, <osg::ShapeDrawable> doorShape and so on.
how can i delete these pointers. 
Need I create free function for each node?
 
Thank you!

Cheers,
LUO

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64465#64465








More information about the osg-users mailing list