Difference between dispose and destructor?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What do you mean by saying a "class is a reference type"?
What is the diff between System.String and System.Text.StringBuilder classes?
What is delegation in oops?
How do you inherit from a class in C#?
What is a race condition?
What is the difference between const and static read-only?
What are the steps to create a webservice and consume it?
The int maps to which C# keyword in .NET type?
What do u meant by "SBI" of an object?
What is stack and heap?
What is marshalling in c#?
Is string value type c#?