Cliff Taylor wrote:

If I remember correctly, Java purposely doesn't give you access to the
base addresses its references point to.  At least, I can't think of an
easy way to access them.  This is all in the name of safe garbage
collection and "data hiding", which ref_ptr<>::get() feels like it's
breaking, at least to me.  Shouldn't we let ref_ptr<> do it's job and
not mess with its internal structures, for the same reason we
shouldn't call ref() and unref() on osg::Referenced family objects?


One thing to remember is that garbage collection (as in Java) is different than managed pointers. The first is a full solution, the second is a nice helper. For example, Java handles circular references, doesn't require "buy in" by all containing classes, etc.. ref_ptr doesn't have this luxury so it is frequently necessary to work around it.

In light of that, it would be impossible to get rid of get().
-Paul (a different Paul. ;))



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

Reply via email to