Re: Thank you and goodbye Mr Peter Morris
- From: "Bruce McGee" <bmcgee@xxxxxxxxxxxx>
- Date: 5 Nov 2007 02:52:56 -0700
Danny Thorpe wrote:
It is a feature to ensure that when a block of code is removed from
memory, that there are no outstanding pointers to that code.
AppDomains exist to ensure dangling pointers don't.
Other than needing to declare class interfaces a certain way so that
they can be marshalled automatically across appdomain boundaries, I'm
not aware of any contortions required to make calls across the
appdomain boundary.
-Danny
Hi Danny,
The way I learned to do it, I had to create a proxy class that gets
created in the context of the app domain. This proxy class is
responsible for loading the assembly(s) and has methods that are used
to indirectly call assembly methods because even if I load an assembly
in a separate app domain, talking to it directly winds up loading it in
the current app domain, which, again, can't be unloaded.
If I want/need to unload an assembly, I need to unload the entire app
domain, so if I'm creating some kind of plug-in system, I either need
to unload and reload all of the plug-ins or use multiple app domains
for more granularity.
Compared to simply loading and unloading an assembly on demand, this is
more futzing around. I had a hard time finding clear documentation
when I first tried this, so that probably left a bad taste in my mouth.
If I'm going about this the hard way and you know an easier and/or more
direct way, please let me know. It wouldn't be the first time.
--
Regards,
Bruce McGee
Glooscap Software
.
- Follow-Ups:
- Re: Thank you and goodbye Mr Peter Morris
- From: Danny Thorpe
- Re: Thank you and goodbye Mr Peter Morris
- From: Dave Nottage [TeamB]
- Re: Thank you and goodbye Mr Peter Morris
- References:
- Thank you and goodbye Mr Peter Morris
- From: Lachlan Gemmell
- Re: Thank you and goodbye Mr Peter Morris
- From: Chau Chee Yang
- Re: Thank you and goodbye Mr Peter Morris
- From: Dave Nottage [TeamB]
- Re: Thank you and goodbye Mr Peter Morris
- From: Bruce McGee
- Re: Thank you and goodbye Mr Peter Morris
- From: Danny Thorpe
- Thank you and goodbye Mr Peter Morris
- Prev by Date: Re: Thank you and goodbye Mr Peter Morris
- Next by Date: Re: New home required
- Previous by thread: Re: Thank you and goodbye Mr Peter Morris
- Next by thread: Re: Thank you and goodbye Mr Peter Morris
- Index(es):
Relevant Pages
|