How can you clean up objects holding resources from within
the code?
Answer Posted / nagasaichand
The recommended practice is to implement both Finalize as
well as Dispose methods on an object which needs to clean up
unmanaged resources. The Finalize method would serve as a
backup mechanism in the event that the Dispose is never
called. The garbage collector would perform the object
finalization and prevent a permanent leak of the unmanaged
resource.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How can an inner class access the members of outer class?
Define an assembly in .net?
What do constructors do in c#?
Is enum a value type c#?
What are satellite assemblies? How will you get the different language strings?
What is object pool in .net?
How do I create a .exe file?
Explain about WSDL
When do you generally use a class over a struct?
What is the difference between out and ref in c#?
What is a static property. Give an example?
What is difference between comparable and comparator?
What is a hash table c#?
Which attribute is used in order that the method can be used as webservice?
What is data binding c#?