我怎样才能弄清楚为什么我的.net服务会消耗内存? [英] How can I work out why my .net service is chewing up memory?

查看:73
本文介绍了我怎样才能弄清楚为什么我的.net服务会消耗内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个.net c#服务,一旦启用,它就会消耗越来越多的内存.它具有一个服务"派生类,该类基本上创建其他对象,这些对象封装了该服务本应支持的单个功能.我在想,也许我正在创建一个对象,并且由于编程错误而没有得到垃圾回收.

We have a .net c# service that when tured on is chewing up more and more memory. It has one 'Service' derived class that basically creates other objects that encapsulate individual functionality that the service is meant to support. Im thinking that maybe I am creating an object and its not getting garbage collected due to a programming error.

任何人都知道在不设置断点的情况下找出正在发生的事情的最佳方法吗?

Anyone know the best way to find out what is going on without setting break points?

推荐答案

您可以使用 memprofiler 蚂蚁分析器,问题也可以帮助什么是一些好的.NET Profilers?

You can use memory profilers like memprofiler, ants profiler, and this question can also help What Are Some Good .NET Profilers?

它们使您可以很好地了解正在创建的对象,它们在其中的生成,它们在使用的内存等.在大多数情况下,您可以使用探查器来缩小问题的范围.

They give you a good look at the objects being created, generation they are in, memory they are using etc. You can, most of the times, narrow down the problem using profilers.

这篇关于我怎样才能弄清楚为什么我的.net服务会消耗内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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