using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
public class Base
{
~Base()
{
Console.WriteLine(“Base Finalizer called”);
}
}
public class Derived : Base
{
~Derived()
{
Console.WriteLine(“Derived Finalizer called”);
}
public void Suppress()
{
GC.SuppressFinalize(this);
}
}
class Program
{
static void Main(string[] args)
{
Derived d = new Derived();
d.Suppress();
Console.ReadLine();
}
}
}
5.9.08
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment