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 are the delegates in c#?

0 Answers  


What is a class c#?

0 Answers  


Do void methods have parameters?

0 Answers  


What is an escape sequence in c#?

0 Answers  


What are controls in c#?

0 Answers  


what is a delegate? what it is used for?

13 Answers   Choice Solutions, TCS,


What do u mean by thread safe?

0 Answers  


What is a system lock?

1 Answers   AZTEC, Wipro,


What is the difference between CONST and READONLY?

0 Answers   BirlaSoft,


What are methods in C#?

0 Answers   Winsol Solutions,


Distinguish between continue and break statement?

0 Answers  


Distinguish between the Debug class and Trace class with its functionality?

0 Answers   Siebel,


Categories