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 the full form of GAC? Explain its uses?
Is php better than c#?
What are the collection classes ?
How do I create a .exe file?
How to call a function when a class implements 2 interfaces and function is present in both interfaces?
Is c# int immutable?
Why should you override the tostring() method?
What is the difference between Java and .NET garbage collectors?
What is void in c#?
Is c# 8 released?
Int map to which .net types?
What?s an abstract class?