How can you clean up objects holding resources from within
the code?
Answers were Sorted based on User's Feedback
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 |
To clean up objects holding resources is to make use of
Dispose Method.
Is This Answer Correct ? | 1 Yes | 0 No |
What is default value of decimal c#?
Is int an object in c#?
What is cosole application?
What is a sealed class?
Which of these string definitions will prevent escaping on backslashes in c#?
List the difference between the virtual method and the abstract method?
What is meant by desktop application?
What is the difference between parse and tryparse in c#?
What is difference between private and protected in c#?
Explain the advantage of using system.text.stringbuilder over system.string?
What are the string functions in c#?
Is arraylist thread safe?