Hi Ivan,
On 11/26/06, Ivan Bolčina <[EMAIL PROTECTED]> wrote:
I assign texture to some geometry's state set on constructor of hierararchy:
dstate->setTextureAttributeAndModes(0,mTexture,
osg::StateAttribute::ON);
Do I have to do this on destructor to avoid memory leaks:
dstate->removeTextureAttribute(0,osg::StateAttribute::TEXTURE);
or not?
Because if I dont, then memory goes up....
There is no need to remove objects from the scene graph to ensure that
memory is properly cleanup, almost all scene graph objects are
referenced counted and this includes textures. This is part of the OSG
that is thoroughly tested over many years and works solidly.
This then leads to the question why you are observing increasing
memory usage. For that you'll need to explain a bit more about the
platform your are using and how you are using the OSG.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/