แก้ไข

แชร์ผ่าน


HwndHost.Dispose Method

Definition

Immediately frees any system resources that the object might hold.

Overloads

Dispose()

Immediately frees any system resources that the object might hold.

Dispose(Boolean)

Immediately frees any system resources that the object might hold.

Remarks

Important

This type or member is not available in the Internet security zone.

Derived classes can override this method (by the Dispose(Boolean) signature) if they need to do additional cleanup.

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 ()

Implements

Remarks

Important

This type or member is not available in the Internet security zone.

This method can be overridden, but not by this signature. See Dispose(Boolean) for the overridable signature. This parameterless signature is the one required by the interface contract, and it effectively calls the active Dispose(Boolean) implementation with disposing being true.

Applies to

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);
protected virtual void Dispose (bool disposing);
[<System.Security.SecurityCritical>]
[<System.Security.SecurityTreatAsSafe>]
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Protected Overridable Sub Dispose (disposing As Boolean)

Parameters

disposing
Boolean

Set to true if called from an explicit disposer and false otherwise.

Attributes

Remarks

Important

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.

Applies to