Hi,

I'm having complications during the transition of the diferent scenes. I want 
to delete all scene and load a new one.
My code structure:
I have a class where I define a scene conponents an other things...

Code:

DemoOSGScene::DemoOSGScene()
{
...
_rootGroup->addChild(_model->getRootGroup());
_rootGroup->addChild(osgDB::readNodeFile("../../../extras/data/3d_models/scene.fbx"));
...
}
DemoOSGScene::~DemoOSGScene(void)
{
        _rootGroup->removeChildren(0,_rootGroup->getNumChildren());
        
        delete _model;
}



_model is a AnimatedModel object that contain osg::ref_ptr osg::Group> 
m_modelRoot.

Code:

AnimatedModel::~AnimatedModel(void)
{
        delete m_animManager;
        delete m_morphManager;
        delete _configReader;

        //m_modelRoot->unref(); //give me an ref_ptr Access violation error
        m_modelRoot->unref_nodelete(); //works ok but memory is not liberated
}




What could be the problem?

Thank you!

Cheers,
Aitor

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53168#53168





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to