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
Is c# code is unmanaged or managed code?
What is a dbml?
What is the difference between IEnumerator and IEnumerable?
What is the advantage of generics in c#?
What is the difference between wrapper class and primitive?
How can I produce an assembly?
Why use a singleton instead of static methods?
What is difference between struct and class in c#?
What does clr stand for?
What is serialization in c#?
How can you write a class to restrict that only one object of this class can be created (Singleton class)?
What is a partial class in c#?
What are the types of class in c#?
What types of object can I throw as exceptions?
What is the difference between a class and an object c#?