Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

WebResponse.Dispose Method

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.

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft