----- Original Message -----
Sent: Monday, May 29, 2006 1:11 AM
Subject: [osg-users] rendersurface +
sceneview memory leak
Hi, All,
I want to display a serial of models by MFC
dialogs, using rendersurface and sceneview to render the models just
like OSGMFC. the program will open one dialog for each
model. The rendersurface and sceneview will be realized and
initialized for each dialog independently. Of course, rendersurface and
sceneview will be removed when the dialog is closed. However, when
the dialog is closed the memory has not be released. I found a
lot of opengl object hasnot be freed, so I add the following
sentences to free GL objects.
m_SceneView->releaseAllGLObjects();
m_SceneView->flushAllDeletedGLObjects();
Producer::GLContext _glcontext=
m_RenderSurface->getGLContext();
::wglDeleteContext(_glcontext);
It works much better with much less memory
leaking. I have tried to use rendersurface->KillGLWindow(), but
it can not be used since this function is protected.
HOWEVER, it seems there also be some memory
leak. doese anybody have the same problem? What I do is correct or
not?
Thanks in advance!
yigang
_______________________________________________
osg-users mailing
list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/