top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the use of the Dispose method?

+1 vote
336 views
What is the use of the Dispose method?
posted Sep 15, 2015 by Sathyasree

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The Dispose method performs all object cleanup, so the garbage collector no longer needs to call the objects' Object.Finalize override. Therefore, the call to the SuppressFinalize method prevents the garbage collector from running the finalizer. If the type has no finalizer, the call to GC.SuppressFinalize has no effect. Note that the actual work of releasing unmanaged resources is performed by the second overload of the Dispose method.

answer Sep 16, 2015 by Manikandan J
...