I am trying to find a way to determine at run-time how much memory a given class is using in .NET. Using Marshal.SizeOf() is out, as it only works on value types. Is there a way to check exactly how much memory a class uses?
I am trying to find a way to determine at run-time how much memory
Share
I’ve only recently started looking into this type of thing, but i have found that memory profilers can give quite detailed information regarding instances of objects within your application.
Here are a couple that are worth trying: