[osg-users] using ref_ptr in any case

Sebastian Schmidt herrdersuppen at gmail.com
Mon Mar 20 06:41:35 PDT 2017

I try to avoid possible memory leaks and currently replacing all pointers of osg object types with ref_ptr.

I read the osgproducer article and some other threads about these reference pointers, but i wonder if there is any advantage for using ref_ptr also in local scope as temporary references to existing pointers. 

osg::ref_ptr<osgViewer::View> pView = dynamic_cast<osgViewer::View*>(&aa);


Read this topic online here:

More information about the osg-users mailing list