Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. detect memory leak

detect memory leak

Scheduled Pinned Locked Moved C / C++ / MFC
questionperformance
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zon_cpp
    wrote on last edited by
    #1

    hi, how do i detect memory leak, in a win32 console project?

    Zo.Naderi-Iran

    R A P C 4 Replies Last reply
    0
    • Z zon_cpp

      hi, how do i detect memory leak, in a win32 console project?

      Zo.Naderi-Iran

      R Offline
      R Offline
      Rage
      wrote on last edited by
      #2

      Plenty of answers here: http://www.codeproject.com/search.aspx?q=memory+leaks&x=0&y=0&sbo=kw[^]   A good practice is to use a lot of ASSERT and VERIFY to check that you are cleaning up your pointers and objects correctly, but that's not sufficient.   You may also use commercial applications : boundschecker[^] for instance   How big is your project ?

      1 Reply Last reply
      0
      • Z zon_cpp

        hi, how do i detect memory leak, in a win32 console project?

        Zo.Naderi-Iran

        A Offline
        A Offline
        Alan Balkany
        wrote on last edited by
        #3

        If all else fails, you can use the Signal Flare debugging pattern: Increase the size of your allocations (one at a time) by ten, and rerun your program. When the memory leak increases by ten, you've found the problem.

        1 Reply Last reply
        0
        • Z zon_cpp

          hi, how do i detect memory leak, in a win32 console project?

          Zo.Naderi-Iran

          P Offline
          P Offline
          Pravin Patil Mumbai
          wrote on last edited by
          #4

          You can also make use of CLR Profiler tool to find the memory leak. There is a very good article at http://msdn.microsoft.com/en-us/magazine/cc163528.aspx[^] about the memory leak.

          I quit being afraid when my first venture failed and the sky didn't fall down.

          1 Reply Last reply
          0
          • Z zon_cpp

            hi, how do i detect memory leak, in a win32 console project?

            Zo.Naderi-Iran

            C Offline
            C Offline
            Cheongwadae
            wrote on last edited by
            #5

            Check out _CrtDumpMemoryLeaks[^]: Finding Memory Leaks Using the CRT Library[^] -House of Blues

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups