Difference between dispose and destructor?

Answers were Sorted based on User's Feedback



Difference between dispose and destructor?..

Answer / nitin

Unused unmanaged resources are removed by dispose method
and It is called manually

Destructor is used to released unused managed resources and
it is called automatically by the Garbase Collector

Is This Answer Correct ?    21 Yes 3 No

Difference between dispose and destructor?..

Answer / vimala

the dispose() method is used to remove the unused resources
from the memory.

whereas the destructor () method is used to deallocate the
allocated memory by the constructor() method.

Is This Answer Correct ?    6 Yes 1 No

Difference between dispose and destructor?..

Answer / penchal das

Dispose()is a method which is used to deallocate the unused
resources.

Destructor() is a method which is called when an object was
destroyed.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Sharp Interview Questions

What is hashtable c#?

0 Answers  


Will the following code compile and run?

0 Answers  


What is sqldatareader c#?

0 Answers  


What is querystring in c#?

0 Answers  


What is platform independence"?

0 Answers   DELL,






What do you mean by stack and heap in c#?

0 Answers  


Why do I get an error (cs1006) when trying to declare a method without specifying a return type?

0 Answers  


What is difference between .net and c#?

0 Answers  


Explain the use of SN.exe

0 Answers   Accenture,


What are instance fields in c#?

0 Answers  


What do you mean by jagged arrays in c#?

0 Answers  


C Sharp

1 Answers   Wipro,


Categories