[osg-users] ref_ptr rules

2011-03-16 Thread Yasser Asmi
I am new to OSG and while I understand the general reference counting rules, I 
am having some trouble finding all the ref_ptr rules we should be following.  
For instance most examples in OSG do not use ref_ptr on objects and also do not 
free them.  Sometime, these objects (Geometry, Vec3Array etc) are passed to 
methods.  It is not clear if the methods are refcounting etc.  Stepping through 
the source is a way to find out but I am looking for general guidance.  Is 
there a resource that talks about it?

Thank you!

Cheers,
Yasser

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37666#37666





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] ref_ptr rules

2011-03-16 Thread Yasser Asmi
Thanks.  That makes sense but I still have a question.

If I am createing a new OSG object in my code, say osg:Geometry, and I know it 
will be passed to a osg method at some point.  How do I know if I should or 
should not wrap it in ref_ptr?  I'd think we should wrap it.  But I have seen a 
lot of examples that do not.  I am concerned about memory leaks.  

Cheers,
Yasser

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37668#37668





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org