> The posted code would behave the same for any type of reference-counted
> memory management system, I imagine, so isn't really an issue with OSG
> ref_ptr<> classes. It's simply an aspect of the algorithm, which programmers
> must be aware of and be careful to avoid.
>
> Or, to put it another way: "I went to the doctor and said, 'hey doc, it
> hurts when I do this' and he replied 'don't do that'". :-)
>    -Paul

Well, that's right: "don't do that"! And you're right, that would be the same 
for any ref pointers system.
Ref pointers are a great solution that is in-between raw pointers and garbage 
collection. You just need to know how to use them...

Note: You can have a look to boost smart pointers ( 
http://www.boost.org/doc/libs/1_36_0/libs/smart_ptr/smart_ptr.htm ), that's 
always interesting.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to