What are the concepts of DISPOSE method?Dispose method belongs to IDisposable interface. It is used to free unmanaged resources like files, network connection etc. it manages and handles this by an instance of the class that implements this interface. Dispose methods must be called explicitly and hence the any object using IDisposable must also implement finalizer to free resources in situations wherein Dispose is not called. Multiple calls to dispose method must be ignored when called once. The objects disposable methods must be called in the order of containment.
|