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

List some of the important session state modes of asp.net.

498


What is the difference between equals() and == in c#?

564


What is difference between viewstate and session state in javascript?

572


What does postback mean?

533


Describe briefly what is the role of IIS on an ASP.NET application? What does it for the same application?

563






What is the difference between user control an custom control?

613


In which situation can you not use a viewstate?

532


What are the differences between primary foreign and unique keys?

518


What is the use of placeholder control?

548


What are validator? Name the validation controls in asp.net? How do you disable them?

544


What are the two properties that are common on every validation control?

551


How about the security in Activex DLL and Activex EXE ?

1785


Explain about Multi-Language integration?

597


What is the syntax for datagrid and specifying columns?

2088


Explain the difference between page.registerclientscriptblock and page.registerstartupscript?

568