[osg-users] osg::DeleteHander - the good, the bad and ugly

Cedric Pinson mornifle at plopbyte.net
Sat Sep 1 18:33:05 PDT 2007


I tried a little brut test about smart pointer from osg and the similar 
approch in boost with instrusive_ptr
here the result with the source code:

 PROFILE_ROOT prt 100.00 glb 100.00 - time  31.785504 avg  31.785504 
ncall 1     
     osg_sm    prt   2.85 glb   2.85 - time   0.905553 avg   0.905553 
ncall 1     
     boost_sm prt   2.84 glb   2.84 - time   0.901856 avg   0.901856 
ncall 1     
     boost2      prt  23.95 glb  23.95 - time   7.611869 avg   7.611869 
ncall 1     
     osg2         prt  70.37 glb  70.37 - time  22.366193 avg  22.366193 
ncall 1     

Cedric

Robert Osfield wrote:
> Hi André,
>
> On 8/31/07, André Garneau <andre at pixdev.com> wrote:
>   
>> FYI you might want to check the Boost::intrusive_ptr implementation (similar
>> in concept to OSG's ref_ptr) as it is using an underlying implementation
>> that does atomic reference counting (using CPU native Interlocked
>> test/increments). Note that I'm not suggesting to use Boost, just to get
>> ideas from this implementation.
>>     
>
> Thanks for the suggestion.
>
> I'm chasing bugs right now.  Could members of the community have a
> look into this? i.e. the possibility of adding atmoic counts into
> OpenThreads and ref_ptr<>.
>
> Cheers,
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.cpp
Type: text/x-c++src
Size: 3238 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070902/dc416317/attachment-0002.cpp>


More information about the osg-users mailing list