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 is hashtable c#?
Will the following code compile and run?
What is sqldatareader c#?
What is querystring in c#?
What is platform independence"?
What do you mean by stack and heap in c#?
Why do I get an error (cs1006) when trying to declare a method without specifying a return type?
What is difference between .net and c#?
Explain the use of SN.exe
What are instance fields in c#?
What do you mean by jagged arrays in c#?
C Sharp