There is a known issue/BUG with MFC, were MFC makes a call to _CrtDumpMemoryLeaks() in the destructor of the _AFX_DEBUG_STATE, followed
by _CrtSetDbgFlag() which sets it to ~_CRTDBG_LEAK_CHECK_DF (therefor disabling memory leak test at *true* program exit) This destructor is called at exit (i.e. atexit()), but before statics residing in dlls and others are destroyed, resulting in many false memory leaks are reported As to fix any real memory leaks, you have the source ... also you can do a google to see how others have gotten around this issue to get at any real leaks. The MFC memory leak will not go away as Microsoft have no reason to fix it( it been there for many years) as MFC is a deprecated API as far as they are concerned also see http://www.mail-archive.com/[EMAIL PROTECTED]/msg11253.html http://www.mail-archive.com/[EMAIL PROTECTED]/msg08551.html Regards Gordon _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Can T. Oguz Sent: Wednesday, May 07, 2008 9:13 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Leaks Hello Everybody, I get lots of memory leak reports when I use OSG within MFC framework (VS 8). Even when I run osgviewerMFC example. What do I miss? Another point is that I need to use single frame rendering instead of simulation loop (steady scenes in MFC views). Would it be ok if I simply call viewer::frame() for each incoming paint request ? Thanks a lot for the reading, Can Oguz
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org