Show
Ignore:
Timestamp:
01/26/09 16:16:24 (4 years ago)
Author:
robert
Message:

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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgWrappers/osg/State.cpp

    r9449 r9549  
    4444        I_DeclaringFile("osg/State"); 
    4545        I_BaseType(osg::Referenced); 
     46        I_BaseType(osg::Observer); 
    4647        I_Constructor0(____State, 
    4748                       "", 
     
    716717                  __void__initializeExtensionProcs, 
    717718                  "Initialize extension used by osg:State. ", 
     719                  ""); 
     720        I_Method1(void, objectDeleted, IN, void *, object, 
     721                  Properties::VIRTUAL, 
     722                  __void__objectDeleted__void_P1, 
     723                  "", 
    718724                  ""); 
    719725