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

What Is The Difference Between The System.array.copyto() And System.array.clone()?

0 Answers   Infosys,


What is type checking in c#?

0 Answers  


How C# 4.0 supports dynamic programming language?

0 Answers  


What is ControlBox Propertie

0 Answers   MCN Solutions,


wt is namespace? wt is the use?

12 Answers  






What are interfaces in c#?

0 Answers  


Can you inherit multiple abstract classes in c#?

0 Answers  


Can you specify nested classes as partial classes?

0 Answers  


What is a console operator?

0 Answers  


What does assert() do?

1 Answers   Wipro,


What is a virtual property. Give an example?

0 Answers  


What is function c#?

0 Answers  


Categories