adspace
Explain the difference between dispose and finalize()?
Answer Posted / Kushal Kumar
In .NET, Dispose is a method that developers can call to release resources such as memory or file handles that their objects are using. This is typically done in the 'using' statement. Finalize is a method that the .NET runtime calls when an object is garbage collected. The Finalize method allows objects to perform any necessary cleanup tasks before they are destroyed. However, finalization is slower than disposal because it requires the object to be garbage collected first. Additionally, calling Dispose manually ensures that resources are released promptly, while relying on finalization means there may be a delay.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to retrieve images in sql server database through vb.net?
How can I extract the formated word(bold,italic,underline,font,color etc) from the msword file.?
What is the use of assembly?
How to store images in sql server database through vb.net?
Explain the difference between system.string and system.stringbuilder classes?
Explain how can we remove handlers at run time?
Explain the difference between datatable and dataset?
How to send xml file on server using http protocol?
What is early binding?
Explain an assembly?
What are the features of c# which are not present in vb.net?
What is option strict?