HttpContent.Dispose 方法

定義

釋放 HttpContent 所使用的 Unmanaged 資源,並選擇性處置 Managed 資源。

多載

Dispose()

釋放 Unmanaged 資源,並處置 HttpContent 所使用的 Managed 資源。

Dispose(Boolean)

釋放 HttpContent 所使用的 Unmanaged 資源,並選擇性處置 Managed 資源。

Dispose()

來源:
HttpContent.cs
來源:
HttpContent.cs
來源:
HttpContent.cs

釋放 Unmanaged 資源,並處置 HttpContent 所使用的 Managed 資源。

public:
 virtual void Dispose();
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Public Sub Dispose ()

實作

適用於

Dispose(Boolean)

來源:
HttpContent.cs
來源:
HttpContent.cs
來源:
HttpContent.cs

釋放 HttpContent 所使用的 Unmanaged 資源,並選擇性處置 Managed 資源。

protected:
 virtual void Dispose(bool disposing);
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Protected Overridable Sub Dispose (disposing As Boolean)

參數

disposing
Boolean

true 表示會同時釋放 Managed 和 Unmanaged 資源;false 則表示只釋放 Unmanaged 資源。

備註

如果已覆寫這個方法,則由公用 Dispose() 方法和 Finalize() 方法呼叫。 Dispose() 叫用這個方法, disposing 並將 參數設定為 trueFinalize 叫用這個方法,並將 disposing 設定為 false

disposing 參數為 true 時,這個方法會釋放 HttpContent 參考的任何 Managed 物件所掌握的資源。 這個方法會叫用每個參考物件的 Dispose() 方法。

適用於