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 sorted list in c#?
What is cshtml extension?
What are the different types of literals in c#?
what is the difference between the debug class and trace class?
Why to use lock statement in c#?
Where are all .NET Collection classes located ?
What are events in C#?
What does the keyword “virtual†declare for a method or property?
Why abstraction is used in c#?
How we free the memory in C#.NET.
What is literal control
About delegates and events?