[Mono-list] Question about the lifetime of libraries loaded by a p/invoke

Robert Jordan robertj at gmx.net
Mon Jul 21 19:41:56 EDT 2008


Petit Eric wrote:
> 2008/7/22 Robert Jordan <robertj at gmx.net>:
>> Maser, Dan wrote:
>>>   The simple question is this:  When a .dll or .so is loaded by the
>>> framework as the result of a p/invoke is that library guarenteed to stay
>>> loaded for the duration of the hosting process?  Or can the framework
>>> unload the dll if it wants to?  Is there anything in a spec that
>>> indicates a standard behavior?  I've been trying to get this from the
>>> microsoft documentation but I can't seem to find anything.
> 
> 
> i see often lifetimeservices, but not sur this wath yu want because i
> never use it, but this is something like that :
> 
>                                System.Windows.Forms.UserControl test = new
> System.Windows.Forms.UserControl();
>                                test.InitializeLifetimeService();
> 

This is unrelated to p/invoke. Lifetime services are part of
.NET remoting's "distributed GC" :-)

Robert



More information about the Mono-list mailing list