what is the difference between removeChild(node) and removeChild(node.get())

classic Classic list List threaded Threaded
3 messages Options
LvQing LvQing
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

what is the difference between removeChild(node) and removeChild(node.get())

osg::ref_ptr<osg::Node> node = new osg::Node;

osg::ref_ptr<osg::Group> group= new osg::Group;

group->addChild(node .get());


what is the difference between group->removeChild(node)

and  group->removeChild(node.get())?

which one is safety?



examyes examyes
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: what is the difference between removeChild(node) and removeChild(node.get())

I think there is no difference between these two methods.

Take a look at <osg/ref_ptr>

        // implicit output conversion
        operator T*() const { return _ptr; }

        T* get() const { return _ptr; }


LvQing LvQing
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: what is the difference between removeChild(node) and removeChild(node.get())

THX!
Loading...