hi Tom,thank you for you answer.
My scene is following.
I want to devolop a smart client application. I designed a plugable
framework and all the plug-ins are UserControls.
Since there are so many plug-ins,I separate the plug-ins into several
assemblies.While runtime,I load the plug-ins
with reflaction.
The one thing I'm warring about is that as the Assemblies loaded,the memory
is more and more used and cann't be
free until the application is closed,the PC's memory can be used up.
Loading assembly in a separate AppDomain cannot solve my problem.
I have to load add-ins(usually are UserControls) to my plugable framework.
That's to say i have to bring one object from one AppDomain to another
AppDomain.
The way to do that is Remoting. Yes i can Remote UserControls,but the
usercontrol
after remoting can not be used as UserControl. So that's not the right
solution.
Best regard
navyliu
"Tom Shelton" <to*********@comcast.net>
??????:11**********************@k70g2000cwa.google groups.com...
>
navyliu wrote:
>I have raised a discussion about assembly unloading.But we can't get a
final
solution.
Since we cannot unlaod a assembly,Is there any reference about this
indicate
that this problem won't make smartclient use up memory?
Best regard
navyliu
You can't unload an Assembly, but you can unload an AppDomain. So, if
you really need to dynamically load/unload an assembly, just create a
new appdomain and load the assembly there. Of course, there is a
performance hit for this because now all calls to the assembly are
marshalled across domain boundries.
--
Tom Shelton