Hi all, In my application I'm using OSG 3.0.1 (I do know it is old, but I do not have the time now to move to a newer version). I think I have a memory leak, and I don't know if it's my fault or a bug in OSG. Using the task manager (on Win 8.1 Pro), I see this.
When I call: GraphicsContext* GraphicsContext::createGraphicsContext(Traits* traits); memory allocated in my application increases of about 2.5 MB. Then, when I call: GraphicsContext::close(bool callCloseImplementation); // I pass true to this function memory allocated in my application decreases of about 1.5 MB. So, there is always about 1 MB that is not deallocated. I tried to investigate a bit, and noticed that the problem seems to happen inside this function: bool GraphicsWindowWin32::setWindow( HWND handle ). Specifically, there are 2 calls in that function where memory is allocated: 1) bool GraphicsWindowWin32::setPixelFormat(); // increases about 1 MB 2) HGLRC GraphicsWindowWin32::createContextImplementation(); // increases about 1.5 MB So, it looks like the memory allocated at point 1 is never released. Is there anything I have to call, when I want to destroy a graphic context, other than close()? Or, if you do know that it is a memory leak, has it been fixed in a newer version of OSG? Thanks, Gianluca Natale
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

