473,385 Members | 1,468 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,385 software developers and data experts.

AppDomain.Unload

Does anyone know if an AppDomain.Unload is guaranteed to free all memory
/resources associated with the AppDomain before the method call returns?
Nov 16 '05 #1
4 2021
IIRC AppDomain.Unload triggers a GC - of course the non-memory resources will have to wait for finalization

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<eZ**************@TK2MSFTNGP14.phx.gbl>

Does anyone know if an AppDomain.Unload is guaranteed to free all memory
/resources associated with the AppDomain before the method call returns?
Nov 16 '05 #2
Hi,

Well it ends all the thread, meaning that all the variables go out of
context and therefore they should be GCed , Ithink it's safe to assume that
all memory/resources are freed.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"John Wood" <jo*******@priorganize.com> wrote in message
news:eZ**************@TK2MSFTNGP14.phx.gbl...
Does anyone know if an AppDomain.Unload is guaranteed to free all memory
/resources associated with the AppDomain before the method call returns?

Nov 16 '05 #3
Well, one thing I'm interested in is remoting.
If my second AppDomain has some wellknown objects registered... will
unloading unregister those immediately? My tests show me that's the case...
but I wanted to know if that was guaranteed or just a fluke.

Thanks for your response.

"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
IIRC AppDomain.Unload triggers a GC - of course the non-memory resources will have to wait for finalization
Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<eZ**************@TK2MSFTNGP14.phx.gbl>
Does anyone know if an AppDomain.Unload is guaranteed to free all memory
/resources associated with the AppDomain before the method call returns?

Nov 16 '05 #4
All objects that are rooted in the appdomain to be unloaded will be
reclaimed. The GC will continue to perform garbage collections until all
those objects have been reclaimed - this may take several GC cycles so that
objects with finalizers will have all run to completion.

In addition to objects, all threads with stack in the appdomain will be
unwound to the boundary of the appdomain.

Chris Brumme has written several blogs on this and related issues - he is a
definitive source.

http://blogs.msdn.com/cbrumme

"John Wood" <jo*******@priorganize.com> wrote in message
news:eZ**************@TK2MSFTNGP14.phx.gbl...
Does anyone know if an AppDomain.Unload is guaranteed to free all memory
/resources associated with the AppDomain before the method call returns?

Nov 16 '05 #5

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

Similar topics

2
by: Satinderpal Singh | last post by:
Hi All, I have an EXE, I load the DLL from that exe in a seperate AppDomain. (I have not given reference to that DLL from the EXE). Now, i call some commands of that dll from the EXE, and in...
4
by: stu_pb | last post by:
I am designing a plugin system for a window application using .NET(C# specifically). One of the requirements of the plugin system is to be able to dynamically load/unload plugins. My initial...
6
by: Wal Turner | last post by:
Hi there. There are various snippets on forums regarding issues with AppDomain.Unload and how it just doesnt work. Fortunately, I got it working with the base case, after much fiddling. Consider...
2
by: Satinderpal Singh | last post by:
Hi All, I have an EXE, I load the DLL from that exe in a seperate AppDomain. (I have not given reference to that DLL from the EXE). Now, i call some commands of that dll from the EXE, and in...
22
by: JPSutor | last post by:
when I use the AppDomain.UnLoad method (which calls the Thread.Abort method), I get the following error message AppDomain can not be unloaded because the thread 1378 can not be unwound out of it...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.