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
Can we set which type of comparison we want to perform by the CompareValidator control?
How to do state management in ASP.NET?
What is the concept of view state in asp.net?
What is cache in asp net?
What are the advantages and disadvantages of Using Cookies?
What’s the catch?
Describe the Server Control Events of ASP.NET?
What is paging in context of Memory?
Can we add code files of different languages in app_code folder?
What is difference between viewstate and session in asp net?
What are the ways to sending the data in ASP.NET page?
1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
How can we identify that the Page is Post Back?
How many web config files can be created for an application?
What does mean by a neutral culture?