0

I'm interested in having many dynamic assemblies loaded on demand.

Since it's possible all these modules may create too much memory pressure, I want to unload them when directed by the OS, or when lack of activity is detected.

How can I unload a previously loaded module? Is quitting the app the only way?

makerofthings7
  • 60,103
  • 53
  • 215
  • 448

1 Answers1

0

You can't unload a previously loaded module.

briannoyes stated:

This is a limitation of .NET, once an assembly is loaded there is no way to unload it unless you restart the process or load it in a separate appdomain, which opens up a whole separate can of worms we decided not to pursue back in Prism 1.

Source

You may try to let unused objects garbage collected and don't hold them in static containers.

Creepin
  • 482
  • 4
  • 20