views:

263

answers:

2

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 allocating any memory during runtime)

+2  A: 

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?

Rubens Farias
That link is quite old. Pre 2.0?
Tony_Henrich
A: 

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?

Lex Li