What is Dispose method in .NET ?

Answer Posted / sudhir sheoran

There are two ways to release the unmanaged resources.
1) Finalize:- Managed/ called by CLR
2) Dispose:- Called by the programmer.

Dispose uses IDisposable interface and suppresses the finalize
method,when called by the programmer.
If programmer forgets to implement dispose method
finalize get invoked and unmanaged resources are freed.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to stored and retrive video in Sql server using asp.net c#......?

530


What is a event in c#?

464


What is namespace give the example?

465


What is default value of enum c#?

463


can multiple catch blocks be executed for a single try statement?

532






What is the meaning of int parse in c#?

507


What is object pool in .net?

536


What is a di class?

533


Why delegates are safe in c#?

459


Is stringbuilder better than string?

523


Why do we need indexers in c#?

480


what is difference between is and as operators in c#?

539


What is mean by c#?

486


What are bitwise logical operators?

486


Distinguish between the Debug class and Trace class with its functionality?

535