force the GC to invoke Finalize() for finalizable objects created in this AppDomain. : Destructor : Class Interface C# Source Code


Custom Search

C# Source Code » Class Interface » Destructor »

 

force the GC to invoke Finalize() for finalizable objects created in this AppDomain.








    
 

using System;
using System.Collections.Generic;
using System.Text;

public class MyResourceWrapper {
    ~MyResourceWrapper() {
        Console.Beep();
    }
}
class Program {
    static void Main(string[] args) {
        MyResourceWrapper rw = new MyResourceWrapper();
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Class Interface
» Destructor