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 the difference between read and readline in c#?

0 Answers  


What is type cast in C#?

0 Answers   TryTechnicals Pvt Ltd,


Explain About remoting and web services. Difference between them

0 Answers   Microsoft,


Is c# int immutable?

0 Answers  


What is stringbuilder c#?

0 Answers  


What is writeline in c#?

0 Answers  


What is the difference between c and c# programming?

0 Answers  


What are the types of access modifiers?

0 Answers  


Is void a class?

0 Answers  


C# called c sharp why?

0 Answers  


What are virtual methods? How are they used?

3 Answers   TCS,


What is thread safe in c#?

0 Answers  


Categories