I am tracking down some memory leaks in our program and have come across
a couple situations where I am currently not sure if it is/can cause a
memory leak. There are many instances in our code where we do something
similar:
osg::ref_ptr<osg::Geometry> geo = new osg::Geometry;
geo->getOrCreateStateSet()->addUniform(new osg::Uniform("blah",
someVal));
geo->getOrCreateStateSet()->addUniform(new osg::Uniform("blah2",
someVal2));
What I am wondering is, will osg now clean up those 2 new uniforms? Or
do I need that be created externally as ref_ptrs so when my object
deletes they will be deleted? I personally want to change it to
ref_ptrs, but given the number of places this change needs to be made, I
at least want to know if the work is truly needed or not.
Karl Cary
SAIC
Software Developer
301-227-5656
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org