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

We can clean up object holding resources by using dispose()
method. Example
DataSet DS=new DataSet()

DS.Dispose()

Is This Answer Correct ?    5 Yes 1 No

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

Answer / mohan kumar e.

We can cleanup objects by implementing IDisposable
interface and providing the implementation for Dispose
method.

Is This Answer Correct ?    3 Yes 1 No

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

Answer / nagasaichand

2 PROCEDURES FORT THIS:
1)Make that value of object as null once the scope is finished.
2)use dispose(); method

Is This Answer Correct ?    1 Yes 0 No

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

Answer / tarun singla

Easiest way is to make the value of that object as null,
once the scope of that object is over. We generally do this
in the 'finally' section of the code.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is the property of class?

0 Answers   Wipro,


What is firstordefault c#?

0 Answers  


List out the differences between array and arraylist in c#?

0 Answers  


List the difference between the virtual method and the abstract method?

0 Answers  


how to store the value in textbox using delegates if we have two user control. the value will be called from one user control to another user control. Loading and unloading will be done through delegates.

1 Answers  






Differentiate between response.expires and response.expiresabsolute?

0 Answers  


What are Memory foot print of an exe?

0 Answers   MCN Solutions,


How do you declare an interface in c#?

0 Answers  


Between windows authentication and sql server authentication, which one is trusted and which one is untrusted?

0 Answers  


What is a cs file?

0 Answers  


Why static constructor is parameterless in c#?

0 Answers  


Which class does the remote object has to inherit?

0 Answers  


Categories