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 do you mean by saying a "class is a reference type"?

0 Answers  


What is the diff between System.String and System.Text.StringBuilder classes?

0 Answers   Siebel,


What is delegation in oops?

0 Answers  


How do you inherit from a class in C#?

1 Answers  


What is a race condition?

0 Answers  






What is the difference between const and static read-only?

0 Answers  


What are the steps to create a webservice and consume it?

0 Answers  


The int maps to which C# keyword in .NET type?

0 Answers   Siebel,


What do u meant by "SBI" of an object?

0 Answers  


What is stack and heap?

7 Answers   Wipro,


What is marshalling in c#?

0 Answers  


Is string value type c#?

0 Answers  


Categories