473,387 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Since we cannot unlaod a assembly,Is there any reference about this indicate that this problem won't make smartclient use up memory?

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
Oct 27 '06 #1
3 1562

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

Oct 27 '06 #2
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

Oct 27 '06 #3
If this makes the smartclient use up memory depends on how assemblies are
loaded. The memory usage will be about the same, as if all used assemblies
where linked staticly. Maybe some overhead. So, if you load many different
assemblies inside the same AppDomain, there will much memory usage, mut not
much more, if all those assemblies were linked staticly.

hth

"navyliu" <na*****@hotmail.comschrieb im Newsbeitrag
news:O5****************@TK2MSFTNGP02.phx.gbl...
>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

Oct 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: WM Chung | last post by:
Hi all, I meet a problem in building my .Net Solution and I would like to seek help. After I have added a dll to reference in one of my project in my solution, when I re-build the solution, I...
9
by: Paul | last post by:
Hi, VB.NET is saying the file I am creating is in use by another process and won't complete its task of moving the file to the specified destination folder. Here is my code (the main bit...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
2
by: G Dean Blake | last post by:
I wrote and deployed a control with the assembly name of GP to the GAC of another dev box via drag and drop. a web page using this control has: <%@ Register TagPrefix="cc1" Namespace="GP"...
1
by: BillGatesFan | last post by:
Click add reference Click .NET dll to add Click Select Click OK Reference never shows up in the treeview.
0
by: Don | last post by:
I intermittently get a runtime Compilation Error that says 'The compiler failed with error code 2000'. It appears that a DLL cannot be found in the 'temporary asp.net files' directory. The...
2
by: Brad | last post by:
I have one of those seemingly simple questions that evades/confuses me. I've created an assembly with bass classes (classes meant to be inherited in other assemblys). In a secondary assembly (my...
11
by: Just Me | last post by:
I have a solution containing many usercontrol projects. When I wish to reference a usercontrol in another project I can select either the project or the assembly. Does it make a difference which...
10
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
This has been working perfectly for months. Since we switched from ASP.NET 1.1 to 2.0, we have constant and sporadic issues with updating our applications. Touching the web.config works about...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.