ÃÂ· Finalize() is called by the runtime
ÃÂ· Is a C# equivalent of destructor, called by Garbage Collector when the object goes out of scope.
ÃÂ· Implement it when you have unmanaged resources in your code, and want to make sure that these resources are freed when the Garbage collection happens.
ÃÂ· Finalize() can NOT be overridden or called in C#.
ÃÂ· Since, Finalize() is called by the Garbage Collector, it is non-deterministic.
ÃÂ· Dispose() is called by the user
ÃÂ· Same purpose as finalize, to free unmanaged resources. However, implement this when you are writing a custom class, that will be used by other users.
ÃÂ· Overriding Dispose() provides a way for user code to free the unmanaged objects in your custom class.
ÃÂ· Dispose() has to be implemented in classes implementing IDispose interface.
ÃÂ· Dispose() method is called explicitly in the code itself.