On 2/10/08 6:03 PM, Daniel Trstenjak wrote:
On Thu, Oct 02, 2008 at 05:08:35PM +1000, Ulrich Hertlein wrote:
Yes, but this is a usage error w.r.t. shared_ptr<>.
You always need to pass the shared_ptr<>  but that works just as well.

Yes, but isn't a solution preferable which allows less errors?

You always have a margin of error with smart pointers. With ref_ptrs you can shoot yourself in the foot by keeping a raw pointer from a ref_ptr around.

I don't think that multi platform programming gets easier by using
boost. Our software still has to run on some old workstations, with
even older compilers. There's more than Linux, Windows and MacOSX.

I'm more thinking of std::tr1::shared_ptr<>; hats of to the boost guys and thanks for the contribution!

Yes, supporting older compilers is an issue. Again, I'm not saying that we should change smart pointers in OSG.

Regarding increased ref/unref: you can completely avoid that by passing references. ref/unref is only called when you copy one shared_ptr to another.

Cheers,
/ulrich
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to