Hi Rabbi, Read this article: http://andesengineering.com/OSG_ProducerArticles/RefPointers/RefPointers .html
> -----Original Message----- > From: Rabbi Robinson [mailto:longa...@gmail.com] > Sent: Thursday, May 28, 2009 11:10 AM > To: osg-users@lists.openscenegraph.org > Subject: Re: [osg-users] osg::ref_ptr<> used anymore > > Hi, > > Thanks, that explains it. Correct me if I am wrong. So to use > it, just create osg::ref_ptr<> and use it as regular pointer > and the memory will be managed by osg::ref_ptr<>. > > In a simple case, I careate Node* node = osg::ref_ptr<new > Node> and, call void* ptr = node. I suppose the reference > count in node will be incremented If later I call, ptr = > NULL, it doesn't seem that there is anyway to tell node to > decrement the reference count in node. Can someone clarify > how osg::ref_ptr<> behave in this case? > > Thank you! > > Cheers, > Rabbi > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=13108#13108 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org