C#/.NET 对象使用多少内存? [英] How much memory does a C#/.NET object use?

查看:21
本文介绍了C#/.NET 对象使用多少内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,目前创建了数百个对象.

I'm developing an application which currently have hundreds of objects created.

是否可以确定(或近似)一个对象(类实例)分配的内存?

Is it possible to determine (or approximate) the memory allocated by an object (class instance)?

推荐答案

你可以使用像

.NET 内存分析器 (http://memprofiler.com/)

.NET Memory Profiler (http://memprofiler.com/)

CLR Profiler(免费)(http://clrprofiler.codeplex.com/)

CLR Profiler (free) (http://clrprofiler.codeplex.com/)

这篇关于C#/.NET 对象使用多少内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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