Detect memory leaks

Last post 07-25-2009 6:47 AM by TATWORTH. 4 replies.

Sort Posts:

  • Detect memory leaks

    07-03-2009, 9:12 AM
    • Member
      2 point Member
    • usharaniP
    • Member since 07-03-2009, 12:59 PM
    • Posts 3

    Hi,

           How to find out the memory leaks in my application. is there any tool to find out the memory leaks. I have developed a windows based application in C#. Please let me know if any tools are provided to find the problem, and also let me know how to modify the code not having the memory leaks.


    Thanks in Advance.

       

  • Re: Detect memory leaks

    07-03-2009, 9:50 AM
    Answer
    • All-Star
      25,564 point All-Star
    • budugu
    • Member since 01-12-2006, 2:15 PM
    • North Carolina
    • Posts 3,802

     Check this..

    http://channel9.msdn.com/forums/TechOff/176182-Detecting-Memory-Leaks-in-your-app/

    These are Asp.Net forums. To get better respone for your windows forms questions, post in following forums..

    http://social.msdn.microsoft.com/Forums/en-US/category/netdevelopment/

    Vijay Kodali || My Blog


    "Don't be afraid to be wrong; otherwise you'll never be right."
  • Re: Detect memory leaks

    07-03-2009, 3:59 PM
    Answer
    • Star
      14,310 point Star
    • JeffreyABecker
    • Member since 10-04-2004, 8:27 AM
    • Philadelphia, PA
    • Posts 2,916

    Technically you cant 'leak' memory in C#.  Maybe you're keeping un-intended long-lived references to objects?

  • Re: Detect memory leaks

    07-04-2009, 11:44 AM
    Answer
    • All-Star
      63,185 point All-Star
    • TATWORTH
    • Member since 02-04-2003, 8:34 AM
    • England
    • Posts 12,333
    • TrustedFriends-MVPs

    >Is there any tool to find out the memory leaks.

    Please download FXCOP 1.36 from http://www.microsoft.com/downloads/details.aspx?FamilyID=9aeaa970-f281-4fb0-aba1-d59d7ed09772&DisplayLang=en

    I check all my ASP.NET web application, class projects and win forms application using FXCOP.

    It is possible to miss Dispose calls - FXCOP will point them out to you.

    Don't forget to click "Mark as Answer" on the post that helped you.
    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
  • Re: Detect memory leaks

    07-25-2009, 6:47 AM
    • All-Star
      63,185 point All-Star
    • TATWORTH
    • Member since 02-04-2003, 8:34 AM
    • England
    • Posts 12,333
    • TrustedFriends-MVPs

    I also suggest that you try Resharper from www.jetbrains.com, this will help you optimise your code. You can download a free trial from their web site.

    Don't forget to click "Mark as Answer" on the post that helped you.
    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
Page 1 of 1 (5 items)