Size of A Class (object) in .NET

后端 未结 6 948
灰色年华
灰色年华 2020-11-28 09:31

How to determine if a Class in .NET is big or small? Is it measured on how many it\'s attributes or fields, datatype of its attributes/fields? or return type of methods? par

6条回答
  •  無奈伤痛
    2020-11-28 09:56

    While the following article is old (.NET 1.1), the concepts explain clearly what the CLR is doing to allocate memory for objects instantiated in your application; which heaps are they placed in, where their object reference pointers are addressing, etc.

    Drill Into .NET Framework Internals to See How the CLR Creates Runtime Objects

提交回复
热议问题