[osg-users] how to release loaded model
tttsuhu at gmail.com
Thu Jul 24 02:45:25 PDT 2008
I need to release loaded model and reload other model. I did as follow:
osg::ref_ptr<osg::Group> root = new osg::Group;
osg::ref_ptr<osg::Group> ModelRoot = new osg::Group;
//in frame loop
loadedModel = osgDB::readNodeFile(CMD_SceneFileName);
The loadedModel is added to ModelRoot and is not added to any other group.
Models could be loaded and "released". But I found used memory was not
reduced at all after "RELEASE_SCENE" was executed. After loading and
releasing several times, used memory is more than 1GB and program is
freezed. I want to know the reason and how to improve it.
Much appreciation to any reply.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users