What is the most efficient way to clear old .NET assemblies from memory?

  • Thread starter Thread starter aaa
  • Start date Start date
A

aaa

First, this is a production environment and I cannot just reboot the
machine. But I have found that sometimes even after I delete and re-GAC an
assembly that the old one still is in operation (I can tell this by it's
behavior).

Hoe do I clear the old assembly from memory without rebooting?
 
aaa,

The only way to release an assembly from memory is to shut down the
application domain that it is loaded into. You have to find all application
domains on the machine that are still using the assembly, and shut them
down.

Hope this helps.
 
In addition to Nicholas,
if this is your application you might consider loading those assemblies into
a separate application domain.
When you release the AppDomain your assemblies are also be 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