On 29 Mar 2008, at 7:26, Daniel King wrote: > Visual C++ reported many memory leaks in output window. > I also did the same test with "hello.cxx" in fltk1, just added > "delete window;" after "run()", no memery leak reported. > > Why?
Are you sure it is not just a false-positive? FLTK doesn't explicitly delete widgets on exit, since the underlying OS guarantees to do that for you on application termination. You only need to explicitly manage the deletion of widgets that are created and destroyed during the runtime of your application - once your application exits, the resources will be released by the OS. The only exceptions to this rule would be if you have some widget that allocates some resource that the OS can not automatically free, in that case you obviously must deal with freeing up those resources yourself. However, that doesn't apply to any of the fltk widgets, AFAIK. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

