Assembly loaded by a static (shared) function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

As I understand it, the only way to unload an assembly from memory is to load
it in a separate appdomain and then unload that appdomain. However, I'm not
sure about this situation. Here's the question: If an assembly is loaded by
a static (shared) function, and no reference is maintained after that
function returns, does the assembly remain in memory? Just trying to get
this sorted out. Thanks!
 
Bagger said:
As I understand it, the only way to unload an assembly from memory is to
load
it in a separate appdomain and then unload that appdomain. However, I'm
not
sure about this situation. Here's the question: If an assembly is loaded
by
a static (shared) function, and no reference is maintained after that
function returns, does the assembly remain in memory? Just trying to get
this sorted out. Thanks!

Yes it does.
 
Bagger said:
As I understand it, the only way to unload an assembly from memory is to load
it in a separate appdomain and then unload that appdomain. However, I'm not
sure about this situation. Here's the question: If an assembly is loaded by
a static (shared) function, and no reference is maintained after that
function returns, does the assembly remain in memory? Just trying to get
this sorted out. Thanks!

Yes, the assembly remains loaded. It *only* gets released when the
AppDomain is unloaded.
 
Back
Top