Hi, Guys
I would guess that observer_ptr may be apropriate. Where I noticed
possibility of such cross reference I tried to use observer_ptr as well. But
I have to admit I have never done extensive memory testing with this code. I
suspect that J-S have more experience regarding this aspect.
Wojtek
----- Original Message -----
From: "Jean-Sébastien Guay" <[email protected]>
To: "OpenSceneGraph Submissions" <[email protected]>
Sent: Tuesday, January 27, 2009 3:27 PM
Subject: Re: [osg-submissions] Circular referencein
osgShadow::MinimalDrawBoundsShadowMap
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
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org