Tool for diagnosing memory leaks in .NET (ASP.NET

2019-02-02 00:59发布

we need a tool to detect easily memory leaks in an ASP.NET Application. We have an application, which consumes lot of memory.

Thanks

9条回答
我命由我不由天
2楼-- · 2019-02-02 01:12

check out Microsoft's FxCop which also analyzes performance issues, etc.

查看更多
三岁会撩人
3楼-- · 2019-02-02 01:18

.Net Memory Profiler. Used the trial version once. It was helpful, but I don't need it often enough to warrant buying one.

The thing I found was to ALWAYS make sure you dispose of any resources, particularly in DirectoryServices, that implement IDisposable.

查看更多
Fickle 薄情
4楼-- · 2019-02-02 01:18

I found this one quite useful too: http://www.codeproject.com/Articles/19490/Memory-Leak-Detection-in-NET

Summary of the interesting points:

  1. Use Perfmon to monitor .Net CLR Locks/# of current logic threads to see if you are creating threads but not destroying them.
  2. Use Perfmon to compare .Net CLR/# Bytes vs. Process/Private bytes to see if it is managed or unmanaged memory that is leaking
  3. Assuming its managed memory that is leaking, using windbg/sos.dll to track down the references
查看更多
仙女界的扛把子
5楼-- · 2019-02-02 01:20

I have published a new article on the subject on MSDN. It contains a list of tools.

查看更多
仙女界的扛把子
6楼-- · 2019-02-02 01:24

Using WinDbg is not as easy as using dotTrace but it can help you to discover lots of oddities in your application. Other than that you can find invaluable information about debugging ASP.Net applications on Tess Ferrandez's blog.

查看更多
Lonely孤独者°
7楼-- · 2019-02-02 01:24

Read Tess at If broken it is, fix it you should. It should get you on the right path.

查看更多
登录 后发表回答