On Tue, Jun 24, 2008 at 10:59 PM, Mike Weiblen <[EMAIL PROTECTED]> wrote: > Is that by intent or oversight? Seems like a risky mix of usemodels.
It's intent. In general all refernce counted objects should have a protected destructor, forcing developers to correctly create the objects on the heap using new, rather on the stack as this would then break the memory managment - as objects on the stack always get deleted when they go out of scope no matter if you reference count them or not. The rule for almost all OSG objects is they correctly have protected destrucutor. So why the exception to this rule. Two key exceptions are NodeVisitor and Viewer/CompositeViewer. So why??? Pragmatism, sometimes this classes you'll want to create on the heap and share instances of them, other times you just want to create a NodeVisitor or Viewer in local scope - here forcing the use of ref_ptr<> etc just makes more code for users to write for no gain. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org