Hi Robert,

I've just reviewed your fix, and rather go with converting the
ref_ptr<Camera> to Camera*, I've opted for using observer_ptr<Camera>
as this will avoid the possibility of dangling pointers.

I'm still not familiar with the benefit of observer_ptr and how it relates to raw pointers and ref_ptrs, but I definitely trust your knowledge of this area. :-)

I've also changed DebugShadowMap to use observer_ptr<> rather than
Camera* for a viewer camera that it was keeping a reference to.  I
didn't spot any other instances of this in the osgShadow, but perhaps
there are others lurking.

I didn't spot any others either. Perhaps Wojtek can confirm?

I've checked these changes in.  Could you do an svn update and double
check that this memory leak is now fixed.

Yep, your fix is good. I'll go have a read of the observer_ptr header now :-)

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to