Hi all,

This is a total noob question, but I must assume that I'm either doing
something incorrectly or misunderstanding how removeChild works.  I have a
program that is loading/unloading model *.osg files on the fly.  When I do a
removeChild on the model's node, no memory seems to be released.  Thus as I
load/unload more models the memory used goes up, which will eventually lead
to a crash.

Just to try this on a simple scale, I went to the osgshadowtexture example
since I knew that a readNodeFile call was made to load cessna.osg, and made
some small modifications.  In the main loop of the program I wait for about
500 iterations after the readNodeFile call, and then I remove all of the
children from the node called "model" in the program.  This obviously
succeeds because if I continue running the example the default blue shows
with all models removed.  Unfortunately, no memory gets freed.  Shouldn't
the memory used go down after that though?  Even if I wait for multiple
iterations after the removal the memory used does not go down.

Is there something blatantly wrong with what I'm doing?  If so could you
tell me what I need to do in order to free the memory that was taken up by
the loading of the cessna.osg?

Thanks in advance.

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

Reply via email to