Is there a way to find how much memory is used for a particular object? For example a List. Taking everything into account, like string interning and whatever is done by compiler/runtime environment/whatever.
C#: Memory usage of an object
c++memorymemory-management
Related Question
- Java – How to discover memory usage of the application in Android
- C# – JavaScriptSerializer – JSON serialization of enum as string
- Java – How to create a memory leak in Java
- C++ – C++ programmers minimize use of ‘new’
- C# – Group by in LINQ
- C# – reason for C#’s reuse of the variable in a foreach
- C++ – Why is the program slow when looping over exactly 8192 elements
- C# – Why not inherit from List
Best Solution
ANTS Memory Profiler profiles the memory consumption of .NET code. I've had great results with it in the past.