Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


How can you clean up objects holding resources from within
the code?

Answers were Sorted based on User's Feedback



How can you clean up objects holding resources from within the code?..

Answer / 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

How can you clean up objects holding resources from within the code?..

Answer / kishore anumala

To clean up objects holding resources is to make use of
Dispose Method.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Does c# support #define for defining global constants?

0 Answers  


Why do we use anonymous method in c#?

0 Answers  


What does it mean to override a method?

0 Answers  


Does c# have a 'throws' clause?

0 Answers  


What is the difference between abstract and virtual?

0 Answers  






Can a method return multiple values in c#?

0 Answers  


Difference between value and reference type. What are value types and reference types?

0 Answers  


Tell us something about static linking and dynamic linking?

0 Answers   C DAC,


what is IFormatable

0 Answers   Wipro,


When do you generally use a class over a struct?

0 Answers  


How do you implement multiple inheritance in .NET?

10 Answers   Microsoft,


what are the advantages of c# over vb.net?

10 Answers   Choice Solutions, HCL, Practical Viva Questions,






Categories