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

Answer Posted / m.sivakumar

Dispose() is called by as an indication for an object to release any unmanaged resources it has held.

Finalize() is used for the same purpose as dispose however finalize doesn’t assure the garbage collection of an object.

Dispose() operates determinalistically due to which it is generally preferred.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I have a particular web page in an asp.net application which displays its own error page?

520


How would you get asp.net running in apache web servers?

534


How to reduce the width of textbox in editcommandcolumn of datagrid?

519


Explain the difference between server.transfer and response.redirect? Why would I choose one over the other?

534


Define repository pattern in asp.net mvc? : asp.net mvc

492






Is asp.net a programming language?

528


What are the various types of cookies in asp.net?

535


Can we have multiple worker process in an ASP.NET application? If so then how it has been handled by application? And who handles it?

547


Which is faster union or union all?

567


What is inheritance and an how it be used, example with an example?

579


Describe the events in the life cycle of a web application.

593


Explain the difference between AutoPostBack and IspostBack in ASP.NET?

595


What are session and cookies?

525


if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....

1594


How long do session variables last?

525