   monitor memory leaks
  Hello guys!How do I now if my application is eating memory, and fails to free it after I exit?I use Visual Studio C++ 6.0.cheersopengl_coder[edited by - opengl_coder on February 14, 2004 10:52:23 AM]
  Assuming Visual Studio, this one is simple, but invaluable. ;  There are several ways to do this, but the best thing to do is not to leak memory in the first place. MSVC6 has built-in functions to track memory leaks and inform you when the application quits, but I''m not sure about other compilers.If you want a compiler-independent implementation, you could look for a memory manager online which tracks memory for you, and simply drop it into your project.  Alternatively, you could write your own, but such a thing is not really necessary when you can get the code from somewhere else. ;  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxcondetectingisolatingmemoryleaks.asp ;  I forgot to mention that I use MSVC6...I will test that function llyod it looks great Built-in functions that sound good psykr.. Should I just compile in debug mode, or how do I use this facility? (I will take a look at the memory manager!)Thank you so much for your replies;  Thank you for the reading MSDN material SpaceDude! ;  Go here and download MMGR. Using it is as simple as including the header file when compiling (you also have to include the C file, so it''ll get compiled, obviously) your project, and it''ll create a log with all the memory leaks it detects, and other nifty features.   ---shurcooL`;  Very niiice thank you shurcool!! ;Probably you deallocate two times the same buffer somewhere, check it out.As a memory detection technique I use to "assert" everything all around, especially routines wich deletes memory, and set to NULL invalid pointers.They are very useful, and dont eat clock-cycles in the release build. A lot of times they prevent bugs you don''t expect!Try!Ciao