Im studying up on .NET multifile assemblies. In the context of multifile assemblies, the book states:
*.netmodules [not the primary module] are loaded on demand by the CLR when used by the calling code
Set me on the right track if I'm wrong, but when calling an executable file, all referenced assemblies, including the executable file's compiled code is loaded into memory, and then is processed by the JIT (Just in time compiler) when the code is called. I may be misunderstanding the quote above, but how I am reading the quote is that .netmodules that are part of a multifle assembly are not loaded into memory until called.
Am I right in thinking this?
... but when calling an executable file, all referenced assemblies, including the executable file's compiled code is loaded into memory
No. Assemblies are loaded as they are needed. if you do not ever need an assembly (e.g. satellite resource assembly for particular language or any reference) they are not loaded. JIT of such assemblies are done whenever they are accessed and loaded. For reference, use Richter's CLR via C#.
精彩评论