What is the Difference B/W Finalize() and Dispose() in .Net?
Answer Posted / sushma
A Dispose() method is explicit, meaning you code Dispose()
up and explicitly call it in your application or system
code. A Finalize() method is implicit, meaning you code
Finalize() up but never actually call it — Finalize() is
called behind the scenes by the .NET GC mechanism.
The GC call the Finalize() function automatically to destroy
the object called implicit destroy. when you want to destroy
a objects that you think no longer need and free it from
memory, then we will use the dispose function. For better
performance we will use the dispose function explicitly.
| Is This Answer Correct ? | 5 Yes | 7 No |
Post New Answer View All Answers
In early binding will the method invoked on com component will verify it?s existance in the system or not ?
How to retrieve user name in case of Window Authentication?
What does asp stand for in asp.net?
What is role-based security in asp.net?
Which class is used to send an email message from an ASP.NET Web page?
Where you store Connection string in "Web.Config" file in ASP.NET?
What are themes and skins in 2.0, explain usage scenario?
What is web api config?
How will you load dynamic assembly? How will create assesblies at run time?
Explain the Order of events in an asp.net page?
Explain how is the asp.net mvc architecture different from others? : asp.net mvc
What is paging in context of Memory?
What is the difference between CC and BCC?
List some of the important session state modes of asp.net.
What is owin authentication?