Answer Posted / susant
The GC call the Finalize () function automatically to
destroy the object called implicit destroy. When you want
to destroy a objects that you think no longer need and free
it from memory, then we will use the dispose function. For
better
Performance we will use the dispose function explicitly.
The Dispose method in .NET belongs to IDisposable interface
and it is best used to release unmanaged objects like File
objects, Windows API objects, Database connection objects,
COM objects etc from the memory. Its performance is better
than the finalize() method.
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is the root element of an xml file?
What happens during the process of boxing?
Is string nullable in c#?
Is datetime a value type in c#?
Why ienumerable is used in c#?
How to get the sum of last 3 items in a list using lambda expressions?
What is hashtable in c# net with example?
C# called c sharp why?
Is string a data type in c#?
Can you store strings in arrays?
Is predicate a functional interface?
What is sqlcommand in c#?
What is eager loading in c#?
What is difference between internal and protected internal in c#?
How can I produce an assembly?