HwndHost.Dispose HwndHost.Dispose HwndHost.Dispose HwndHost.Dispose Method

定義

立即釋放物件可能佔用的任何系統資源。Immediately frees any system resources that the object might hold.

多載

Dispose() Dispose() Dispose() Dispose()

立即釋放物件可能佔用的任何系統資源。Immediately frees any system resources that the object might hold.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

立即釋放物件可能佔用的任何系統資源。Immediately frees any system resources that the object might hold.

備註

重要

此類型或成員無法在網際網路安全性區域中使用。This type or member is not available in the Internet security zone.

衍生類別可以覆寫這個方法( Dispose(Boolean)透過簽章),如果它們需要進行額外的清除。Derived classes can override this method (by the Dispose(Boolean) signature) if they need to do additional cleanup.

Dispose() Dispose() Dispose() Dispose()

立即釋放物件可能佔用的任何系統資源。Immediately frees any system resources that the object might hold.

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

實作

備註

重要

此類型或成員無法在網際網路安全性區域中使用。This type or member is not available in the Internet security zone.

這個方法可以被覆寫,但不能被這個簽章所取代。This method can be overridden, but not by this signature. Dispose(Boolean)需可覆寫的簽章,請參閱。See Dispose(Boolean) for the overridable signature. 此無參數簽章是介面合約所需的簽章,它會有效地Dispose(Boolean)呼叫使用disposingtrue的實作為。This parameterless signature is the one required by the interface contract, and it effectively calls the active Dispose(Boolean) implementation with disposing being true.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

立即釋放物件可能佔用的任何系統資源。Immediately frees any system resources that the object might hold.

protected:
 virtual void Dispose(bool disposing);
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
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 Boolean Boolean Boolean

如果從明確處置器呼叫,則設定為 true,否則設定為 falseSet to true if called from an explicit disposer and false otherwise.

備註

重要

此類型或成員無法在網際網路安全性區域中使用。This type or member is not available in the Internet security zone.

如果衍生類別需要執行額外的清除,則可以覆寫這個方法。Derived classes can override this method if they need to do additional cleanup. 不過,它們也應該呼叫基底執行,以確保釋放所有資源。However, they should also call the base implementation to ensure that all resources are freed. 基底執行作業會執行相當可觀的工作,以釋放基類已知的資源。The base implementation does fairly substantial work to free resources that are known to the base class.

如果正在裝載視窗,則會將它終結。If a window is being hosted, it will be destroyed.

呼叫執行緒必須與發送器相同。The calling thread must be the same as the dispatcher.

適用於