I would like to know if the actual C # class code is loaded into RAM when creating the class instance?
So, for example, if I have 2 classes CLASS A, CLASS B, where class A has 10,000 lines of code, but only 1 field, int. And class B has 10 lines of code, as well as 1 int int field. If I create an instance of class A, will it take more memory than class B because of its lines of code?
Additional question: if lines of code are loaded into memory along with the class, will they be loaded for each instance of the class? or only once for all instances?
Thanks in advance.
, JITted . , IL- .
- , - . ( ) - JIT- . List<string> List<Stream> , List<int> List<Guid> . (, , .) - - .
List<string>
List<Stream>
List<int>
List<Guid>
A , B. , , , , , . , , , , .., , , .
, , , . , , ( ) .
, , , . , 10 , - 10 000, , IL . IL , .NET Reflector.
This is a good article that describes how and where the JIT IL is uploaded: http://msdn.microsoft.com/en-us/magazine/cc163791.aspx
Source: https://habr.com/ru/post/1727455/More articles:Как предотвратить приложение cocoa от замораживания? - cocoaМожет ли Castle ActiveRecord открыть сеанс без гражданства? - sessionDatanucleus / JDO Level 2 Cache in Google App Engine - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1727453/jquery-add-class-to-certain-elements&usg=ALkJrhgNutQCQ-4Q5uZ5LJTSzfonFFmGuwSilverlight MultiScaleImage does not fill the free space - silverlightmemcache example with jpa entitymanager on jgae? - javaWhat is the technical cause of the bank card problems of 2010 in Germany? - bankingDynamic number of Django filters for querying objects - pythonHow to export Oracle table to tab separated values? - perlКак я могу догадаться имя действия из url в Rails? - ruby-on-railsAll Articles