[osg-users] Memory not being released, causing crash

Robert Osfield robert.osfield at gmail.com
Fri May 17 01:33:49 PDT 2019

Hi Juan,

There isn't any way we can know precisely what is wrong given the lack
of specifics.  All we can do at this stage is ask questions about what
you are doing and make general questions.

For instance you saying you are deleting a scene and re-opening a
scene.  What do you actually mean.  In the OSG you don't explictly
delete objects, you should be using ref_ptr<> to manage all scene
graph objects.  What do you mean specifically by "re-open", load it
from disk?

What type of viewer/windowing are you using?

What OSG version/platform are you using?

My recommendation at this point would be to create a small test
program that demonstrate the usage case you are using in a way that
minimal but sufficient enough to demonstrate the problem.  Such as
small test program can also be shared with others in a way that allows
them to do a code review and spot problems, or run the program on
their own systems to see if it reveals what the issue might be.


On Thu, 16 May 2019 at 23:22, Juan Cruz <j_g_5 at hotmail.com> wrote:
> Hi,
> I have a problem where when I create a OSG scene, then delete it, apparently the memory is not being released.  I say this because if I re-open the scene 3 times, the 3rd time the textures show partially black, and the 4th time I close and re-open the scene, the program crashes.  It seems to me it's reaching a memory limit.
> I'm deleting all children under the root group, setting the viewer scene data to null, and deleting everything before re-opening the scene.  What could be going on?
> Thank you!
> Cheers,
> Juan
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=76114#76114
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list