Hi Paul Martz,
The example in the middle of page 37, above the one Cliff cited, looks
like it won't compile. Did you really mean to return *grp? I know it's
meant to show bad programming practice but the book reads like it should
compile.
osg::Group* CreateGroup()
{
osg::ref_ptr<osg::Group> grp = new osg::Group;
return *grp;
}
> -----Original Message-----
> From: Cliff Taylor [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 10, 2008 1:23 PM
> To: [email protected]
> Subject: [osg-users] Returning ref_ptr<> vs. ref_ptr<>::get()
>
> osg::ref_ptr<osg::Group> createGroup()
> {
> osg::ref_ptr<osg::Group> grp = new osg::Group;
>
> //comments
> return grp.get()
> }
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org