What is the Difference B/W Finalize() and Dispose() in .Net?

Answer Posted / rahupathi

Finalize and dispose are used to clean the objects from
memory. But Finalize will be called based on the GC. If you
finalize any object that will be moved to Finalize queaue.
When the time of the round trip of the GC. It will remove
the objects from Finlize queaue.So,it will not destroy the
object immediately. Unless dispose method will remove the
object immediatley without considering the GC.

Is This Answer Correct ?    16 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?

530


Explain how asp.net different from asp?

563


How to comment out asp.net tags?

633


If we remove web.config or machine.config from the application then, is this application will works?

600


what are the ihttphandler and ihttphandlerfactory interfaces ?

516






Web API supports which protocol?

858


When does a session actually start?

575


What are the disadvantages of asp.net?

593


What's the difference between viewstate and sessionstate?

572


I have an external link in my application say www.xyztest.com. Today this site works on http protocal. Tommorow it may run on https. So i cant hardcore the protocal in the site. When a user clicks on the link how can i know if the external site works on http or https and takes him to that place?

1469


How many types of triggers are there in update panel?

577


What is the difference between a multi-layer and multi-tier applications?

575


What is the difference between user control and custom control?

486


What are the advantages and limitations of query string?

574


What are html helpers in asp.net?

531