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 if you add duplicate elements to a set?
Which one is trusted and which one is untrusted?
What problem does Delegate Solve?
Does c# support properties of array types?
What is a dictionary in c#?
In a single .NET DLL how many classes it contains?
Can int be null c#?
Explain about c# language.
Can derived classes have greater accessibility than their base types?
What are virtual destructors?
Are c# objects passed by reference?
What is the difference between C# 3.5 and C# 4.0?
What is difference between iqueryable and ienumerable in c#?
What is difference between a constant and read-only in C#?
Why do we use classes?