Client. Close Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Closes the HttpClient instance and releases allocated resources. For programming guidance for the HttpClient class, and code examples, see the HttpClient conceptual topic.
public: virtual void Close() = Close;
// This member is not implemented in C#
' This member is not implemented in VB.NET
The Close method releases allocated resources used by the HttpClient instance. The Close method can manage the lifetime of system resources (the underlying socket and memory for the HttpClient, for example) used by a Windows Runtime object.
In the .NET Framework 4.5, this method projects as the Dispose method. In Visual C++ component extensions (C++/CX), this method projects as the destructor (delete operator).
Apps written in C++ or CX don't have a Close method since these apps can destroy the object. In C++ and CX, objects are released when they fall out of program scope or as part of the destructor (delete operator) for the object.
Submit and view feedback for