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 difference between an Structure and Class?

1 Answers  


What does m mean in decimal c#?

1 Answers  


What are custom exceptions?

1 Answers  


Explain the types of Polymorphism.

1 Answers   Accenture,


Is c# int immutable?

1 Answers  


What is the meaning of MSIL?

1 Answers   TCS,


What is serialization of data?

1 Answers  


Which .gang of four. Design pattern is shown below?

1 Answers  


What is returned if you pass the value 12.34 to the parsefloat () function?

1 Answers  


What is _viewstart cshtml?

1 Answers  


What are the advantages of interface in c#?

1 Answers  


what is c# command?

1 Answers  


Categories