Home »

Difference between Dispose and Finallize method?

Question ListCategory: .NETDifference between Dispose and Finallize method?
milleranthony7 author asked 8 years ago
1 Answers
jessica537 author answered 8 years ago

Finalize method is used to free the memory used by some unmanaged resources like window handles (HWND). It’s similar to the destructor syntax in C#. The GC calls this method when it founds no more references to the object. But, In some cases we may need release the memory used by the resources explicitely.To release the memory explicitly we need to implement the Dispose method of IDisposable interface.

Please login or Register to Submit Answer