Looking for Memory Leak Advice

Discussion in 'Web Design & Coding' started by Complete, Oct 16, 2007.

  1. Complete

    Complete OSNN Addict

    Messages:
    94
    Apart from buying BoundsChecker or any of the other tools to track down memory leaks. Does anyone have any advice or tips from your years of programming experience to offer on how to track down the causes of memory leaks?

    I find that the big dump that happens at the end of a program does not typically lend any useful clues as to where or what was allocated that was not freed. I find that I have to back track and comment out sections of code until through the process of elimination and trial-and-error, I am able to narrow down where the problem is. And since this is usually at the bottom of the To-Do list, the memory leaks are not plugged.
     
  2. Shamus MacNoob

    Shamus MacNoob Moderator Political User

    Messages:
    4,199
    Location:
    L'Ile Perrot Quebec
  3. Complete

    Complete OSNN Addict

    Messages:
    94
    right.

    But, unfortunately, on windows XP. So I do not know if your suggestion will work.
     
  4. Complete

    Complete OSNN Addict

    Messages:
    94
    I have learned that you need to have a
    CoUnitialize()
    to go along with every
    CoInitailze(0)
    I wonder if I need something to go along with my CoCreateInstance calls.