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:
@@ -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,
|
||||
"",
|
||||
"");
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user