Comments (3)
Yes, it will. So long as you call Dispose() on the context you can use it as long as you like. If you're using proxy objects, remember to handle their leases properly else the domain will GC it: http://msdn.microsoft.com/en-us/magazine/cc300474.aspx.
Closing a context will destroy the app domain--which in effect will also "unload" your assembly. Note that no actual unloading is ocurring--it's impossible to unload an assembly once loaded--instead we're tossing the domain away that contained the assembly. You have to be very, very careful here to not pollute the main domain with any classes from the remotely loaded domain--there are a couple of ways you can do this on accident. Mostly you should avoid reflecting across any classes inside the remotely loaded assembly outside of simple metadata queries, and be sure to only interact with that domain through serialized objects or proxies (those objects extending MarshalByRef)
from appdomaintoolkit.
Thank you for that.
from appdomaintoolkit.
No problem. Feel free to ask anything :). I need to add some unit tests demonstrating the above behavior (isolated assembly loading inside a context). Shouldn't be too hard to do--I'll make a note of it.
from appdomaintoolkit.
Related Issues (16)
- Assembly deep references HOT 1
- IDisposable usage is not intuitive HOT 4
- Unable to see how this can work when the assemblies being loaded are not known to the host at compile time HOT 4
- Cannot build downloaded ZIP HOT 4
- Serialization failure using RemoteFunc.Invoke HOT 5
- getting "could not load file or assembly" HOT 1
- Examples of hot swapping assemblies HOT 4
- Accessing types from loaded assemblies HOT 8
- AppDomain requests unrestricted access upon creation HOT 10
- Ability to use Assembly.Load(byte[]) HOT 1
- Appdomain is sometimes loading dlls from Parent directory of PrivateBinPath and sometimes from PrivateBinPath HOT 4
- Is there a way to get a direct reference to the Assembly object in the AppDomainContext? HOT 2
- Test FindByCodeBase_NoRefAssembly_LoadFrom fails when project is part of another solution HOT 7
- Issue with Resolve event HOT 7
- nuget package request HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appdomaintoolkit.