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

What is the difference between Session and response.Redirect?

608


We are using Jscriopt validations and at clint site javascript is not running that time validation would work? if yes then how it would behave?

1396


Give some salient points of difference between request processor and request dispatcher.

608


What is cookies in asp net?

517


What is caching? What are different ways of caching in asp.net?

656






What is httpresponse?

502


Explain how can we inherit a static variable?

518


3. What goals do you have in your career?

1414


How do u deploy ur project?

2213


Define machine.config in .net?

547


Explain diff. Between friend and protected friend?

492


What are the advantages of using session?

426


What I need to create and run an asp.net application?

508


Do I need to have the latest version of windows media player installed?

509


Suppose you want an asp.net function (client side) executed on the mouseover event of a button. Where do you add an event handler?

556