[Mono-devel-list] Embedding mono
Jonathan Pryor
jonpryor at vt.edu
Tue Jun 29 07:26:11 EDT 2004
On Wed, 2004-06-23 at 12:30, Joe Ante wrote:
<snip/>
> Now I would like to:
>
> 1) Unload the old assembly. Is that possible? Which function should I use?
You cannot unload assemblies. You *can* unload AppDomains. So you
should create an AppDomain, load the assembly within the AppDomain, and
proceed as normal. When you need to load an updated assembly, close the
AppDomain and re-create it.
I suppose you could shutdown and restart the default AppDomain, but I'm
not sure if this is safe/supported. Then again, I'm not sure if
AppDomains are currently working; historically, AppDomain support has
been problematic, but I don't recall hearing about any problems with
them recently.
> 2) I would like to be able to load the assembly from memory if that is
> somehow possible without too much work. I tried using
> mono_image_open_from_data but that crashed the app so I assume I am not
> supposed to *just* call that function.
Paolo? You want to field this one?
- Jon
More information about the Mono-devel-list
mailing list