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
Is int a struct in c#?
How to use session under class file of APP_Code folder?
What is tochararray in c#?
What is a cs file?
Define clr in .net?
What are the 3 elements of delegation?
What is the difference between array and list in c#?
Define delegate?
What is an extension method in c#?
Can you inherit multiple abstract classes in c#?
Are c# generics the same as c++ templates?
What is class method c#?
What is the difference between package and interface?
How does return work in c#?
How is lazy loading achieved?