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
What is application variable?
Explain the flow of processing of the request? : asp.net mvc
What is localhost in asp.net?
How can u debug your .net application?
What is webresource axd?
What is the advantage of mvc over asp.net? : Asp.Net MVC
Can we set master page as a start page?
What is protected configuration?
What is asp.net web application?
What does asp stand for in asp.net?
What are the advantages of asp.net?
How do we access view state value of this page in the next page?
What can you do with asp.net?
Explain page output caching?
Can we use a static function with a non-static variable?