Hi J-S I did what you suggested and now it's working fine. Thnaks for your help and explanation. Moji the Great
--- On Thu, 5/14/09, Jean-Sébastien Guay <jean-sebastien.g...@cm-labs.com> wrote: From: Jean-Sébastien Guay <jean-sebastien.g...@cm-labs.com> Subject: Re: [osg-users] Question about osgViewer::View::EventHandlers To: "OpenSceneGraph Users" <osg-users@lists.openscenegraph.org> Date: Thursday, May 14, 2009, 9:21 PM Hi Moji, > So is there any specific reason for using ref_ptr instead of observer_ptr in > definition of osgViewer::View::EventHandlers? The viewer owns the event handlers, thus ref_ptr is the right choice. The normal usage of an event handler is: viewer->addEventHandler(new MyEventHandler); and thus the use of ref_ptr is appropriate in that case. Perhaps one solution would be to move the event handler functionality of your wrapper class into another internal class, add that event handler to the viewer and then use ref_ptr on your viewer but observer_ptr on your event handler. There would then be no ref_ptr cycles. Hope this helps, J-S -- ______________________________________________________ Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org