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 purpose of dependency injection?

0 Answers  


what is the diference between casting and converting?

2 Answers  


From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?

0 Answers  


What is string concatenation?

0 Answers  


Explain About remoting and web services. Difference between them

0 Answers   Microsoft,






What is default value of bool in c#?

0 Answers  


What are the commonly used i/o classes?

0 Answers  


what is a constructor? What is a destructor?

0 Answers  


Can You Prevent Your Class From Being Inherited By Another Class?

0 Answers   Siebel Systems,


what are nullable types in c#

0 Answers   Cognizant,


What is Garbage Collection in .Net?

0 Answers  


What is the difference between <c> and <code> xml documentation tag?

0 Answers  


Categories