dotgnu-general
[Top][All Lists]
Advanced

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

[DotGNU]Finalization


From: Thong \(Tum\) Nguyen
Subject: [DotGNU]Finalization
Date: Sun, 22 Jun 2003 12:28:18 +1200

Could someone please test to see if the following code works with the
latest CVS build?

using System;

public class TestFinalizer
{
        public class Pok
        {
                ~Pok()
                {
                        Console.WriteLine("finalized!");
                }
        }

        public static void Main()
        {
                for (int i = 0; i < 1000; i++)
                {
                        new Pok();
                }

                GC.WaitForPendingFinalizers();
        }
}


It should print out "finalized!".

Thanks,

^Tum





reply via email to

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