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. Memory leak

Memory leak

Scheduled Pinned Locked Moved C / C++ / MFC
testingbeta-testingtoolsperformancehelp
4 Posts 4 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.
  • N Offline
    N Offline
    Noman Nadeem
    wrote on last edited by
    #1

    Hi, I have come accross a memory leak in my project ... could anyone suggest any memmory leak testing utility which will help me pinpoint the source of the leak regards

    A B 2 Replies Last reply
    0
    • N Noman Nadeem

      Hi, I have come accross a memory leak in my project ... could anyone suggest any memmory leak testing utility which will help me pinpoint the source of the leak regards

      A Offline
      A Offline
      Anders Molin
      wrote on last edited by
      #2

      BoundsChecker from Numega is great. You can get a 15-days evaluation copy their website... - Anders Money talks, but all mine ever says is "Goodbye!"

      1 Reply Last reply
      0
      • N Noman Nadeem

        Hi, I have come accross a memory leak in my project ... could anyone suggest any memmory leak testing utility which will help me pinpoint the source of the leak regards

        B Offline
        B Offline
        billb2112
        wrote on last edited by
        #3

        BoundsChecker does work wonders, but the object dump should do a pretty good job of telling you where your leak might be. Sometimes, if you're lucky, if you click on the object name or the memory address the debugger spits out right below "Detected memory leaks -->" it will put you in the right area of the source. If it doesn't, then you'll have to do a little fishing on your own or consider NuMega products. Bill http://www.ratebeer.com

        D 1 Reply Last reply
        0
        • B billb2112

          BoundsChecker does work wonders, but the object dump should do a pretty good job of telling you where your leak might be. Sometimes, if you're lucky, if you click on the object name or the memory address the debugger spits out right below "Detected memory leaks -->" it will put you in the right area of the source. If it doesn't, then you'll have to do a little fishing on your own or consider NuMega products. Bill http://www.ratebeer.com

          D Offline
          D Offline
          Derek Waters
          wrote on last edited by
          #4

          Actually, if you really want to track down these memory leaks without forking out for BoundsChecker, there is a really good debugging trick described in Knowledge Base Article Q151585 which described the _crtBreakAlloc variable (You can search for Q151585 or "Use _crtBreakAlloc to Debug a Memory Allocation" in MSDN) Basically, when you get an object dump with numbers next to it, you start your program in the debugger, set _crtBreakAlloc to that number, then run your program. The debugger will break when the memory is allocated that you have forgotten to free. Very very handy. ------------------------ Derek Waters derek@lj-oz.com

          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