Difference between Dispose and Finalize method

Answer Posted / kirti

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.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I add asp.net mvc testcases in visual studio express?

601


Is .net framework going away?

565


What is the 'page life cycle' of an ASP.NET MVC?

612


Which approach provides better support for test driven development - asp.net mvc or asp.net webforms?

513


How you can implement custom validation in asp.net MVC?

582






Explain the 'page lifecycle' of an ASP.NET MVC?

634


What are the advantages of asp.net mvc?

567


What is needed for running an application built on winfx on the .net framework 3.0?

521


how do you mark a property as required? For example, for a project, the name is a required field.

588


What is the difference between adding routes, to a webforms application and to an mvc application?

555


Explain the difference between viewbag and viewdata in mvc?

542


Mention two instances where routing is not implemented or required?

751


Explain RenderBody and RenderPage in ASP.Net MVC?

596


How can I return string result from action in asp.net mvc?

573


What is the use .glimpse in mvc?

600