От: | FlyDN | ||
Дата: | 07.11.05 22:06 | ||
Оценка: |
class Program
{
private class Test
{
Timer _timer;
public Test()
{
_timer = new Timer(new TimerCallback(TimerCallbackFunc), null, 0, 0);
}
~Test()
{
Console.WriteLine("Finalizer");
}
private void TimerCallbackFunc(object state)
{
}
}
static void Main()
{
new Test();
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
Console.ReadLine();
}
}