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 are the different method of navigation in asp.net?
How do I use response redirect?
Explain what is an assembly?
Explain what are the advantages of asp.net mvc framework? : asp.net mvc
Explain the use of duration attribute of @outputcache page directive.
Can one dll file contains the compiled code of more than one .net language?
What is the life cycle of web page?
What are standard controls?
What are the versions of garbage collection?
What language is asp.net written in?
How can you implement the postback property of an asp.net control?
Securitywise What are the Enhancements in 2.0?
Explain the main function of url routing system in asp.net mvc? : asp.net mvc
How do you use viewstate?
How do you create a master page?