CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Dec 2009
    Posts
    9

    Checking for memory leaks

    Hi
    im working with directx 9 and i was wondering
    how do i start detecting memory leaks if there are any?
    thnx

  2. #2
    Join Date
    Apr 2008
    Posts
    725

    Re: Checking for memory leaks

    you want to look for memory leaks inside dx9?

  3. #3
    Join Date
    Dec 2009
    Posts
    9

    Re: Checking for memory leaks

    basically how do i detect mainly in c++

  4. #4
    Join Date
    Apr 2004
    Posts
    102

    Re: Checking for memory leaks


  5. #5
    Join Date
    Dec 2009
    Posts
    9

    Smile Re: Checking for memory leaks

    thnx

  6. #6
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Checking for memory leaks

    If you are using Visual Studio, it will tell you automagicaly where the leaks are.

  7. #7
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Checking for memory leaks

    Quote Originally Posted by Skizmo
    If you are using Visual Studio, it will tell you automagicaly where the leaks are.
    Are you sure? I had the impression that that feature is only provided by Visual Studio Team System, not by all editions of Visual Studio.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  8. #8
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Checking for memory leaks

    Quote Originally Posted by laserlight View Post
    Are you sure? I had the impression that that feature is only provided by Visual Studio Team System, not by all editions of Visual Studio.
    hmm you could be correct.. not 100% sure, but I've used MFC in VS 6 and 7 and it always tells me, because MFC has build-in debug macro's for memleak detection.

  9. #9
    Join Date
    Dec 2009
    Posts
    9

    Talking Re: Checking for memory leaks

    i'm working with vc++ 2010 beta 2 and its quite good i wonder when the final is gonna be released

  10. #10
    Join Date
    Dec 2009
    Posts
    145

    Re: Checking for memory leaks

    Quote Originally Posted by venomv1986 View Post
    Hi
    im working with directx 9 and i was wondering
    how do i start detecting memory leaks if there are any?
    thnx
    If you don't learn about debugger then it is hard to find leaks in your program source code although the general good coding habit will be of help. MFC also provides serveral functions to detect leaks but these gain boils down to the coding and programming techniques along with logical reasoning and problem skills you need to obtain via real coding of particular problems you run into.

  11. #11
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Checking for memory leaks

    It's there in all versions but without using MFC you have to some work yourself. See MSDN on for instance the subjects 'CRT Debugging Techniques' and 'Memory Leak Detection Enabling'
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  12. #12
    Join Date
    Dec 2009
    Posts
    9

    Re: Checking for memory leaks

    Ok i'l check thnx

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured