How to research unmanaged memory leaks in .NET?

后端 未结 4 525
别那么骄傲
别那么骄傲 2021-02-02 09:39

I have a WCF service running over MSMQ. Memory gradually increases over time, indicating that there is some sort of memory leak. I ran the service locally and monitored some c

相关标签:
4条回答
  • 2021-02-02 09:45

    This blog will help you if you are willing to learn about windbg (http://www.microsoft.com/whdc/devtools/debugging/default.mspx).

    http://blogs.msdn.com/tess/default.aspx

    0 讨论(0)
  • 2021-02-02 09:51

    Make sure that you close the service client after using it. something like

    try {
    ... do work ...
    Close();
    } ... exception handling ... {
    Abort();
    }
    
    0 讨论(0)
  • 2021-02-02 10:03

    Ants Profiler is worth considering. As far as I can remember, you can download a trial version.

    0 讨论(0)
  • 2021-02-02 10:07

    You can use Windbg to analyze the process Heap. There are some articles and cheat sheets showing how to do this, like Memory Leak Detection Using Windbg

    0 讨论(0)
提交回复
热议问题