Hi, Carsten
Thanks for you response.

> I'm not really familiar with _CrtMemDumpAllObjectsSince, but according
> to the documentation it prints information about memory that is
> allocated. IIUC this does not mean that memory has been leaked it is
> just in use. It would become a leak if it was not freed once it is no
> longer needed.
_CrtMemDumpAllObjectsSince is called by MS runtime just before the
program exists, so it does mean memory leak.

> > 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?
>
> Hm, no. Does creating a GLUTWindow have an effect on the list of
> allocations you see ?
If I create a  GLUTWindow, it won't print any memory leak. If there is
a GLUTWindow, then the application quits after all windows are closed,
maybe some code in GLUTWindow clean up the memory?

> > Those memory leak are in osglog.cpp, which codes are supposed to clean
> > up those memory block?
>
> The line number in the messages above point to the constructor of
> OSG::Log, which should only run once. It does some allocations, but
> those basically have to remain until the program exits, because
> otherwise logging will not be functional beyond some point, which is not
> really desirable.
It also has other memory leak, actually a very long list. I checked
the code but could not figure out which code is supposed to delete log
objects. The destructor is not called in my case.

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