I believe you have something wrong with design. I learned hard way that you
really should leave memory management to osg. Just remove from hierarhy/your
classes and you should be fine. Always user ref_ptr-s and it will work.

bye,
ivan


2006/12/13, xiaoshuxing <[EMAIL PROTECTED]>:

 Hello, everyone:

Osg::ref_ptr is used automatically manage the memory allocation, but it
only release the memory when the point is out of scope

What should I do if I want to release the memory the pointer is pointing
to explicitly?

In my program, I want to delete the whole scene, and change to another
scene. But the osg::ref_ptr<> pointer is defined as a global variable which
will not be out of scope.

I've used a recursive call to "unref" every node in the tree, but errors
happens, saying that "access violation".

Is there any suggestion?



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to