如何检测在C#应用程序的内存泄漏 [英] How to detect memory leaks in C# application

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

问题描述

如何检测在C#应用程序的内存泄漏?什么工具需要使用?哪些最佳做法你知道吗?

How to detect memory leaks in C# application? What tools need to use? What best practices do you know?

推荐答案

检测内存泄漏并不是一件容易的事情,而且也没有明确的回答这个问题。您可以使用分析器工具,如蚂蚁内存分析器或的dotTrace 。您还可以看看的<一个href="http://www.microsoft.com/downloads/details.aspx?familyid=86ce6052-d7f4-4aeb-9b7a-94635beebdda&displaylang=en">CLR从微软探查的是免费的,但是更难以使用。

Detecting memory leaks is not an easy task and there's no definitive answer to this question. You could use profiler tools such as the ANTS Memory Profiler or dotTrace. You could also take a look at the CLR Profiler from Microsoft which is free but is more difficult to use.

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

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