Hi Andy,

On 1/26/07, Andrew Somerville <[EMAIL PROTECTED]> wrote:
Robert Osfield wrote:
> This loose coupling means that you could use the OSG safely without
> your own ref_ptr<>, or use non OSG objects (once not even subclassed
> from osg::Referenced) with osg::ref_ptr<> - as long as they implement
> the ref counting.

That would allow the OSG module of the system to create ref_ptrs out of
members of a shared data type, but would not allow shared data type
itself to contain OSG compatible ref_ptrs members (without an OSG
dependency). In my mind this misses the original aim: sharing references
across subsystems, and thus doesnt solve the problem the proposal set
out to solve.

You've lost me a bit here.  The OSG's reference counted objects don't
need osg::ref_ptr<> and osg::ref_ptr<> doesn't need osg::Referenced.
This means any osg::Referenced object can work with a new ref_ptr<>
implementation (as long as wall ref/unref/unref_nodelete or
osg::ref_ptr<> can work any object that implements
ref/unref/unref_nodelete.  This is what I mean by loose coupling.

As you said, one can always use another external smart pointer
implementation along side OSG's (boost or otherwise), but having two
different implementations of the same solution is undesirable as it can
lead to confusion in code, and strange incompatibilities down the line.

I can certainly understand the desire to avoid externalizing an
additional dependencies though especially since it appears only Ignacio
and I find the proposal desirable.

For the time spent on this thread you could have implemented you
custom smart pointer.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to