[Mono-devel-list] Re: AppDomain unloading

Paolo Molaro lupus at ximian.com
Tue Oct 21 06:00:35 EDT 2003


On 10/20/03 Varga Zoltan wrote:
> Paolo Molaro <lupus at ximian.com> írta:
> 
> > 
> > We need to force a GC and finalization run before
> unloading. At that
> > point, all the objects that belong to the domain and need
> finalization
> > are force-finalized, even if they are still reachable. We
> need a sort of
> > callback in libgc to get the list of objects. We also
> won't allow the
> > objects to be marked for finalization again.
> 
>  This could work, but it creates problems, since objects
> will be finalized
> in a random order, meaning an object will be finalized
> before the
> objects whose finalization depends on this object being alive.

Yes, there is no guarantee on the order of finalization in this case,
not even the MS runtime guarantees it (IIRC one of the MS bloggers wrote
that they added some hacks so that Console.WriteLine would work, but
that's it).

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list