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 the web.config file in asp?
How will you load dynamic assembly? How will create assesblies at run time?
What’s the catch?
6. Tell us about a time when you failed to meet a deadline. What were the repercussions?
What is the concepts of globalization and localization in .net?
What are the server controls in asp.net?
What is another word for redirect?
9. Why should we hire you over the others waiting to be interviewed?
Elaborate differentiation between Cache and Application?
Define globalization and localization.
How can we inherit a static variable?
What is class and object in asp.net?
What is the latest version of asp.net?
If you are using components in your application, how can you handle exceptions raised in a component?
Can you clarified A Web service can only be written in .NET or not?