如何找到内存泄漏在.NET应用程序的原因 [英] How to find the cause of a memory leak in a .net application

查看:206
本文介绍了如何找到内存泄漏在.NET应用程序的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.net应用程序(运行作为Windows服务)。不时启动的内存泄漏(使用1GB的RAM +)。如何找到这个内存泄漏的原因是什么?哪些工具在那里,你怎么使用?

I have a .net application (running as a windows service). From time to time it starts memory leaking (using 1GB+ of RAM). How do I find the cause of this memory leak? Which tools are there and how do you use them?

推荐答案

我用 WinDbg的和SOS-extesion成功在.NET应用程序调试memoryleaks。

I used WinDbg and the SOS-extesion with success for debugging memoryleaks in .NET applications.

看一看<一个href="http://blogs.msdn.com/b/delay/archive/2009/03/11/where-s-your-leak-at-using-windbg-sos-and-gcroot-to-diagnose-a-net-memory-leak.aspx"相对=nofollow>这里和<一href="http://www.simple-talk.com/dotnet/.net-framework/investigating-.net-memory-management-and-garbage-collection/"相对=nofollow>这里得到一个开始。我还建议苔丝Ferrandez的博客了解更多有关调试.NET使用的WinDbg

Have a look here and here to get a start. I also recommend Tess Ferrandez' blog for more information about debugging .NET with WinDbg

这篇关于如何找到内存泄漏在.NET应用程序的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆