开发者

Does the whole .NET assembly get loaded in memory or just the parts used?

开发者 https://www.devze.com 2022-12-09 01:25 出处:网络
If I have a 15M .NET assembly and a program calls a method in it, does the whole assembly get loaded into memory and use 15M or a lot less? (assuming the assembly is not allocatin开发者_StackOverflow社

If I have a 15M .NET assembly and a program calls a method in it, does the whole assembly get loaded into memory and use 15M or a lot less? (assuming the assembly is not allocatin开发者_StackOverflow社区g any memory during runtime)


AFAIK, all assembly gets loaded into current AppDomain;

Also, check this link for more information on subject: Why isn't there an Assembly.Unload method?


How about this? If we capture a process dump (full memory dump) of your program, we can extract all the assemblies from that dump. Is that a sign that all assemblies are actually loaded into memory?

0

精彩评论

暂无评论...
验证码 换一张
取 消