Detected memory leaks!
Dumping objects ->
{139} normal block at 0x004E4D00, 1 bytes long.
Data: < > 00
{138} normal block at 0x004E4CC0, 1 bytes long.
Data: < > 00
{137} normal block at 0x004E4C80, 1 bytes long.
Data: < > 00
{136} normal block at 0x004E4C40, 1 bytes long.
Data: < > 00
Object dump complete.
I checked again my code and all seemed be ok. So, I tried with a empty main() and the result was the same.. Why?
[c++] Memory leaks
Hi!
I wrote a little game application just for try a graphic engine, and when I looked for memory leaks with _CrtDumpMemoryLeaks() the result was:
You can try to use debug function to break to the given allocation:
If the allocation happens before main(), ie from global objects, you can try to to set the breakpoint in the Watch window
#include <crtdbg.h>// Put in first line of main()._CrtSetBreakAlloc(136);
If the allocation happens before main(), ie from global objects, you can try to to set the breakpoint in the Watch window
Quote:Original post by Michelepa87Do you have globals that allocate memory?
I tried with a empty main() and the result was the same.. Why?
Now my code is:
and I still have leaks problems.
I tried to set breakpoints on a memory allocation number but nothing happened.
#define _CRTDBG_MAP_ALLOC#include <crtdbg.h>int main(){ _CrtSetDbgFlag( _CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF ); _CrtDumpMemoryLeaks(); return 0;}
and I still have leaks problems.
I tried to set breakpoints on a memory allocation number but nothing happened.
If you use _CrtSetDbgFlag() to schedule a leak test you don't also call _CrtDumpMemoryLeaks() to check for leaks manually.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement