17 Apr 2010

Sanjay Saini's TechWorld: Difference between Destructor, Dispose and Finalize methods

Sanjay Saini's TechWorld: Difference between Destructor, Dispose and Finalize methods: "should only implement a Finalize method to clean up unmanaged resources. You should not implement a Finalize method for managed objects, because the garbage collector cleans up managed resources automatically. Finalize method is called by the GC implicitly therefore you can not call it from your code.

Note: In C#, Finalize method can not be override, so you have to use destructor whose internal implementation will override the Finalize method in MSIL.But in the VB.NET, Finalize method can be override because it does support destructor method.
Posted by sanjay saini at 12:31 AM"