_CrtDumpMemoryLeaks() question

This is a discussion on _CrtDumpMemoryLeaks() question within the Windows Programming forums, part of the Platform Specific Boards category; I know my engine is leaking some memory and I'm about to fix it, but I called _CrtDumpMemoryLeaks() at the ...

  1. #1
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709

    _CrtDumpMemoryLeaks() question

    I know my engine is leaking some memory and I'm about to fix it, but I called _CrtDumpMemoryLeaks() at the end and checked the return value.

    As expected, it returned TRUE but there was no "dump" of any sort. I looked over the MSDN entry - does it dump to stdout? If so, will I have to create a console (through CreateFile()) to see it in a Win32 project?
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  2. #2
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Heh, you know it's funny, I fix that leak and it's still reporting TRUE.
    Well I'm sure I'll figure it out where the others are eventually.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  3. #3
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    The debug output window should list the memory leaks when the program exits. Something like:
    Detected memory leaks!
    Dumping objects ->
    {112} normal block at 0x00325EA0, 20 bytes long.
    Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  4. #4
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    What debug output window?
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  5. #5
    Codebot
    Join Date
    Jun 2004
    Location
    Toronto
    Posts
    195
    Quote Originally Posted by ahluka
    What debug output window?
    at the very bottom fo visual studio there is a bunch of tabs, one of them is the output window. press Ctrl-Alt-O to bring it up. also you can do it through the View menu>other Windows>Output
    Founder and avid member of the Internationsl Typo Associateion

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 03:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 06:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 01:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21