Difference between dispose and destructor?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are some examples of desktop applications?

508


What is whitespace in c#?

499


What is a type c#?

503


Does c# provide copy constructor?

583


What is session management in c#?

543






What is the namespace for the thread class?

527


How do I create a .exe file?

491


What is a shared assembly?

552


What is the interface in c#?

523


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

522


Why are mutable structs evil?

555


Is c# scripting language?

513


Explain the term inheritance in C#.

544


List down the differences between “dispose” and “finalize” methods in c#.

454


To allow an element to be accessed using a unique key which .NET collection class is used ?

627