On 2/08/2013 17:46, Mathias Fröhlich wrote:
>> This design problem with shared_ptr<> forces you to copy
>> shared_ptr<>'s all the time when access data members which just can't
>> be efficient and requires end users to always stick to this rule.
> Ack!
> Also you need twice as much mallocs because the reference counts need to be 
> allocated seperately.

std::make_shared allocates object and ref-counter in one allocation :-)

C++11 also has std::enable_shared_from_this which solves some issues, but still 
hasn't the
same semantics as osg::ref_ptr.

Cheers,
/ulrich
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to