473,405 Members | 2,379 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,405 software developers and data experts.

Assembly

I have an application which loads assemblies from assembly cache. Assembly
cannot be unloaded from memory without unloading the entire AppDomain, so
every time I compile assemblies with new versions, its loaded to my
application and the old ones remain in memory. Do I understand right the
whole process, so it causes memory leak?
Nov 16 '05 #1
4 2331
Let me try to understand what you are doing a bit more clearly ...

When you say Assembly Cache, are you referrring to the Global Assembly Cache or something else?

You have your application running with an existing version of an assembly. You then build another version and deply it to the cache (GAC?). Do you restart your application to get the new version? or does it somehow "know" the new version is there and load it without restarting?

You are right about not being able to unload an assembly without unloading the entire AppDomain.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

I have an application which loads assemblies from assembly cache. Assembly
cannot be unloaded from memory without unloading the entire AppDomain, so
every time I compile assemblies with new versions, its loaded to my
application and the old ones remain in memory. Do I understand right the
whole process, so it causes memory leak?

Nov 16 '05 #2
Yes, I am referring to Global Assembly Cache. Application isnt restarted, it
automaticly loads last version of assembly from GAC.

"Richard Blewett [DevelopMentor]" <ri******@NOSPAMdevelop.com> wrote in
message news:OT**************@TK2MSFTNGP11.phx.gbl...
Let me try to understand what you are doing a bit more clearly ...

When you say Assembly Cache, are you referrring to the Global Assembly Cache or something else?
You have your application running with an existing version of an assembly. You then build another version and deply it to the cache (GAC?).
Do you restart your application to get the new version? or does it somehow
"know" the new version is there and load it without restarting?
You are right about not being able to unload an assembly without unloading the entire AppDomain.
Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

I have an application which loads assemblies from assembly cache. Assembly cannot be unloaded from memory without unloading the entire AppDomain, so
every time I compile assemblies with new versions, its loaded to my
application and the old ones remain in memory. Do I understand right the
whole process, so it causes memory leak?

Nov 16 '05 #3
In that case you are going to be loading multiple versions of the asssembly and your memory requirements will grow. You will have to load the assembly into a separate AppDomain and unload this old AppDomain when the new version is available to keep your working set contained

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Yes, I am referring to Global Assembly Cache. Application isnt restarted, it
automaticly loads last version of assembly from GAC.

"Richard Blewett [DevelopMentor]" <ri******@NOSPAMdevelop.com> wrote in
message news:OT**************@TK2MSFTNGP11.phx.gbl...
Let me try to understand what you are doing a bit more clearly ...

When you say Assembly Cache, are you referrring to the Global Assembly Cache or something else?
You have your application running with an existing version of an assembly. You then build another version and deply it to the cache (GAC?).
Do you restart your application to get the new version? or does it somehow
"know" the new version is there and load it without restarting?
You are right about not being able to unload an assembly without

unloading the entire AppDomain.

Nov 16 '05 #4
Can I load assembly from GAC with AppDomain?

"Richard Blewett [DevelopMentor]" <ri******@NOSPAMdevelop.com> wrote in
message news:e%****************@TK2MSFTNGP15.phx.gbl...
In that case you are going to be loading multiple versions of the asssembly and your memory requirements will grow. You will have to load the
assembly into a separate AppDomain and unload this old AppDomain when the
new version is available to keep your working set contained
Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

Yes, I am referring to Global Assembly Cache. Application isnt restarted, it automaticly loads last version of assembly from GAC.

"Richard Blewett [DevelopMentor]" <ri******@NOSPAMdevelop.com> wrote in
message news:OT**************@TK2MSFTNGP11.phx.gbl...
> Let me try to understand what you are doing a bit more clearly ...
>
> When you say Assembly Cache, are you referrring to the Global Assembly Cache or something else?
>
> You have your application running with an existing version of an

assembly. You then build another version and deply it to the cache

(GAC?). Do you restart your application to get the new version? or does it somehow "know" the new version is there and load it without restarting?
>
> You are right about not being able to unload an assembly without

unloading the entire AppDomain.

Nov 16 '05 #5

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

Similar topics

2
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding...
26
by: nospam | last post by:
Just wondering, What do you think the difference in performance would be between (1.) Compiled C# (2.) Compiled C++ (3.) and Assembly Language And how would the mix be if some if any of...
2
by: Carlos G Benevides | last post by:
I have a ASP.Net web application that has two assemblies that run under com+. Under Windows 2000 the two assemblies are added to com+ automatically when instantiated from the web site. For this...
10
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
7
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
2
by: Paul | last post by:
Hi, I have experience in Java and C++ but I am rather new to C# and just started learning it. I am using Visual C# 2005 Express Edition and I found that there is a file called "AssemblyInfo.cs",...
1
by: Coaster | last post by:
orig ref here http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/ff29cc370678911d/c0db5b7e3da283b9?lnk=st&q=gac+assembly+new+version&rnum=7#c0db5b7e3da283b9...
14
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.