Robert Osfield wrote:
Its worth noting ref_ptr<> doesn't depend upon anything other than
templates. Just check the header to ref_ptr<> yourself. All it does
is require ref(),. unref() and unref_nodelete() to be available on the
class its bound to at compile time.
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.
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.
Andy
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/