Fixed effective leak in Program::PerContextProgram caused by previously osg::State keeping a set of std::ref_ptr<Program::PerContextProgram> without ever pruning this list.

The fix was to convert the osg::State to use C pointers for the set of applied PerContexProgram objects, and use the osg::Oberver mechanism to avoid dangling pointers for being maintained in osg::State.
This commit is contained in:
Robert Osfield
2009-01-26 15:16:24 +00:00
parent 55a0381687
commit 69f9377093
5 changed files with 47 additions and 10 deletions

View File

@@ -43,6 +43,7 @@ END_REFLECTOR
BEGIN_OBJECT_REFLECTOR(osg::State)
I_DeclaringFile("osg/State");
I_BaseType(osg::Referenced);
I_BaseType(osg::Observer);
I_Constructor0(____State,
"",
"");
@@ -716,6 +717,11 @@ BEGIN_OBJECT_REFLECTOR(osg::State)
__void__initializeExtensionProcs,
"Initialize extension used by osg:State. ",
"");
I_Method1(void, objectDeleted, IN, void *, object,
Properties::VIRTUAL,
__void__objectDeleted__void_P1,
"",
"");