Hi all.
I need to release loaded model and reload other model. I did as follow:
osgViewer::ViewerViewer;
osg::ref_ptrosg::Group root = new osg::Group;
osg::ref_ptrosg::Group ModelRoot = new osg::Group;
osg::ref_ptrosg::Node loadedModel;
...
Viewer.setSceneData(root.get());
Hi Su,
You shouldn't be called ref_ptr.release() in this context, you should
be just setting the ref_ptr to null.
ref_ptr::release() is a specialist helper method with does an
unref_noDelete on the referenced object - it deliberately doesn't
delete the object that it's unrefecing. This
Hi Robert,
I set ref_ptr to null. It works well. Thanks a lot.
Best Regards,
Su Hu
2008/7/24 Robert Osfield [EMAIL PROTECTED]:
Hi Su,
You shouldn't be called ref_ptr.release() in this context, you should
be just setting the ref_ptr to null.
ref_ptr::release() is a specialist helper
Hi Ümit
Thanks for you suggestion. There are several scene models in our application
and they are large. So we have to release them when we start a new scene.
Thanks again.
Kind Regards,
Su Hu
2008/7/24 Ümit Uzun [EMAIL PROTECTED]:
Hi Su,
I think you shoul use Switch node to change the
Hello Robert,
ref_ptr::release() is a specialist helper method with does an
unref_noDelete on the referenced object - it deliberately doesn't
delete the object that it's unrefecing. This functionality is
required for functions that use ref_ptr locally but then have to
pass a C* point of the
5 matches
Mail list logo