Hi,

Ok, i was mislead by previous thread and setting NULL to ref_ptr. So, i'm using 
removeChild, as it should be and got crash. I'm doing this in such way:


Code:

osg::ref_ptr < osg::Geode >  geode = new osg::Geode; // on start
osg::Geode* g = geode.get(); // store pointer to my geode somewhere to process 
my system
myObject.storePointer(g);

//and then (another method to delete node)
osg::Geode* g = myObject.getPointer();
osg::Group* gr = g->getParent(0); // there is no multiple parents available

gr->removeChild(g);



Node 'g' seems to be removed from the scene, but then i've got a crash (after 
leaving method to delete). I've commented out removing child and there is no 
crash. And cannot find cause of that. Is it right way to do such kind of 
operation as removing node from scene?

Thank you!

Cheers,
Robert

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to