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
Why static variables are used?
Why do we need indexer in c#?
Are cao stateful in nature?
Compare and contrast between the System.Array.CopyTo() and Clone()?
What is difference between variable and property in c#?
What is the lock statement in c#?
Name the two classes are required for implementing a windows service?
What is ado net in c#?
What is the purpose of c#?
How can we sort an array in c#?
Why c# is called c sharp?
Can you describe iuknown interface in short?
How to find the current application file path while runtime?
What is the use of functional interface?
What does get set mean in c#?