Click here to Skip to main content
15,791,449 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please help me! How can I calculate the memory space occupied by an object?
Thanks in advance.....
Updated 23-Aug-10 9:20am
Sandeep Mewara 23-Aug-10 7:49am    
Can you elaborate more on what are you trying and where are you stuck?
Ramya 2010 23-Aug-10 8:11am    
I developed an application which currently having hundreds of objects created.
Is it possible to determine (or approximate) the memory allocated by an object(class instance)?

1 solution

The easiest way is to use a Memory Profiler.
There are commercial profilers like: .NET Memory Profiler[^] or ANTS Memory Profiler[^].
You can also use CLR Profiler[^] which is free.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900