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
What happens during the process of boxing?
You are designing a user control. You created new property called backgroundimage which is of type image. You wanted to disable storing this property in the user’s form. How to achieve this?
What is a long in c#?
What is generic method in c#?
What is the difference between namespace and class in c#?
How long can loop recorders stay in?
what is IFormatable
What is Implementation inheritance and interface inheritance?
In a memory when you Box and Unbox a value-type what happens?
How does it work?
What is action c#?
What is token in c#?
Is class reference type c#?
Can we have two main methods in c#?
What do you mean by casting a data type?