From Michael Platings, "Changed some pointers to ref_ptr which fixed the leak
"
This commit is contained in:
parent
3dbda7e9bc
commit
33cdeec757
@ -40,7 +40,7 @@ osg::Geode* daeReader::processInstanceGeometry( domInstance_geometry *ig )
|
||||
domGeometryGeodeMap::iterator iter = geometryMap.find( geom );
|
||||
if ( iter != geometryMap.end() )
|
||||
{
|
||||
cachedGeode = iter->second;
|
||||
cachedGeode = iter->second.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -119,7 +119,7 @@ osg::Geode* daeReader::processInstanceController( domInstance_controller *ictrl
|
||||
domGeometryGeodeMap::iterator iter = geometryMap.find( geom );
|
||||
if ( iter != geometryMap.end() )
|
||||
{
|
||||
cachedGeode = iter->second;
|
||||
cachedGeode = iter->second.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -83,7 +83,7 @@ void daeReader::processBindMaterial( domBind_material *bm, domGeometry *geom, os
|
||||
if ( iter != materialMap.end() )
|
||||
{
|
||||
// Reuse material
|
||||
ss = iter->second;
|
||||
ss = iter->second.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -232,9 +232,9 @@ protected:
|
||||
domInstance_effect *currentInstance_effect;
|
||||
domEffect *currentEffect;
|
||||
|
||||
typedef std::map< domGeometry*, osg::Geode*> domGeometryGeodeMap;
|
||||
typedef std::map< domMaterial*, osg::StateSet*> domMaterialStateSetMap;
|
||||
typedef std::map< std::string, osg::StateSet*> MaterialStateSetMap;
|
||||
typedef std::map< domGeometry*, osg::ref_ptr<osg::Geode> > domGeometryGeodeMap;
|
||||
typedef std::map< domMaterial*, osg::ref_ptr<osg::StateSet> > domMaterialStateSetMap;
|
||||
typedef std::map< std::string, osg::ref_ptr<osg::StateSet> > MaterialStateSetMap;
|
||||
|
||||
/// Maps geometry to a Geode
|
||||
domGeometryGeodeMap geometryMap;
|
||||
|
Loading…
Reference in New Issue
Block a user