dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Finalization


From: Rhys Weatherley
Subject: Re: [DotGNU]Finalization
Date: Sun, 22 Jun 2003 10:50:28 +1000
User-agent: KMail/1.4.3

On Sunday 22 June 2003 10:28 am, Thong \(Tum\) Nguyen wrote:

> It should print out "finalized!".

Actually, it is doing the right thing for "WaitForPendingFinalizers".  If you 
put "GC.Collect" just before the "WaitForPendingFinalizers" call, then it 
will print things.

I tried it out on MS'es engine and the "WaitForPendingFinalizers" didn't do 
anything either (because the GC hadn't run yet).  But once the engine shut 
down, it printed the messages.

The problem is that we weren't running a final GC pass during engine shutdown 
to run the remaining finalizers.  I just added this to "ILExecProcessDestroy" 
and it seems to work now.  However, it will probably need adjusting once 
threads are added to the system to properly shutdown the finalizer thread.

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]