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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top