FtpWebResponse implements IDisposable, but it doesn't have a Dispose method. How is that possible?
IDisposable is usually used when a class has some expensive or unmanaged resources allocated which need to be released after their usage. Not disposing an object can lead to memory leaks.
If you don't use using , then it's up to you (the calling code) to dispose of your object by explicitely calling Dispose().
If a type implements the IDisposable interface, you should always call the Dispose method on an instance of the class when you are done using it. The presence of IDisposable indicates that the class has some resources that can be released prior to garbage collection.
It is always recommended to use Dispose method to clean unmanaged resources. You should not implement the Finalize method until it is extremely necessary. At runtime C#, C++ destructors are automatically converted to Finalize method.
Its implemented in the base class WebResponse, see http://msdn.microsoft.com/en-us/library/system.net.webresponse_methods.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With