Dispose Method
Collapse the table of content
Expand the table of content

WebResponse.Dispose Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Releases the resources used by the current instance of the WebResponse class.

Namespace:  System.Net
Assembly:  System.Net (in System.Net.dll)

public void Dispose()

Implements

IDisposable.Dispose()

When you are finished using this instance of WebResponse, call Dispose() to release all resources used by this instance. You should eliminate further references to this WebResponse instance so that the garbage collector can reclaim the memory of the instance instead of keeping it alive for finalization.

Dispose() calls the Dispose(Boolean) method, which contains the code to release managed and unmanaged resources.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft