Why is my finalizer not being called?
using System;
class Program
{
static void Main(string[] args)
{
Test test = new Test();
}
}
class Test
{
public Test()
{
Console.WriteLine("Start");
}
~Test()
{
Console.WriteLine("End");
}
}
I searched on the Internet, I did not find anything suitable. I was expecting a console output "End" at the end.