Hi all.
I got memory leak with OpenSG1.8 in debug mode on windows/VS2005.

To reproduce the problem, simply comment out some code of 01hello.cpp, like this

// Init the OpenSG subsystem
osgInit(argc,argv);

/* commented out
    // GLUT init
    int winid = setupGLUT(&argc, argv);
    // the connection between GLUT and OpenSG
    GLUTWindowPtr gwin= GLUTWindow::create();
    gwin->setId(winid);
    gwin->init();
    // create the scene
    NodePtr scene = makeTorus(.5, 2, 16, 16);
    // create the SimpleSceneManager helper
    mgr = new SimpleSceneManager;
    // tell the manager what to manage
    mgr->setWindow(gwin );
    mgr->setRoot  (scene);
    // show the whole scene
    mgr->showAll();
    // GLUT main loop
    glutMainLoop();*/

Then I checked VS memory leak by
MS function "_CrtMemDumpAllObjectsSince( NULL );"

It prints a long memory leak list, like this

{203} normal block at 0x02576B38, 32 bytes long.
 Data: < oW     (       > 90 6F 57 02 C8 09 90 02 28 08 90 02 CD CD CD CD
{202} normal block at 0x02576A00, 248 bytes long.
 Data: < c=  c=         > 0C 63 3D 10 14 63 3D 10 00 00 00 00 CD CD CD CD
c:\opensgsource\base\base\osglog.cpp(367) : {162} normal block at
0x02576948, 56 bytes long.
 Data: <  8   8         > EC F8 38 10 E8 F8 38 10 00 00 00 00 00 00 00 00
c:\opensgsource\base\base\osglog.cpp(367) : {160} normal block at
0x02576890, 56 bytes long.
 Data: <  8   8         > EC F8 38 10 E8 F8 38 10 00 00 00 00 04 00 00 00
c:\opensgsource\base\base\osglog.cpp(367) : {158} normal block at
0x025767D8, 56 bytes long.
 Data: <  8   8         > EC F8 38 10 E8 F8 38 10 00 00 00 00 00 00 00 00


But 01hello.cpp itself doesn't have memory leak, what I have done is
to comment all lines except osgInit()

So do I always have to create a GLUT windows to avoid memory leak?
Those memory leak are in osglog.cpp, which codes are supposed to clean
up those memory block?

Thanks!
Pan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to