HttpMultipartFormDataContent.Close Method

Definition

Closes the HttpMultipartFormDataContent instance and releases allocated resources.

C#
// This member is not implemented in C#

Implements

M:System.IDisposable.Close

Remarks

The Close method releases allocated resources used by the HttpMultipartFormDataContent instance. The Close method can manage the lifetime of system resources (memory for the HttpMultipartFormDataContent, 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 JavaScript, C#, or VB.NET use garbage collection to release resources. So the Close object and associated resources don't get released until the garbage collection pass runs. The Close method allows an app to release these resources early rather than waiting for the object to be released by garbage collection.

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.

Applies to

Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100