共用方式為


ReactControl.銷毀

當要從 DOM 樹狀結構中移除元件時,會呼叫這個方法。 使用它來清理並釋放元件正在使用的任何記憶體。

適用於

模型導向和畫布應用程式

語法

destroy()

Example

public destroy(): void
{
    this.button.removeEventListener("click", this.onButtonClick);
}

React 控制項和平台庫
反應控制
Power Apps 元件架構 API 參考
Power Apps 元件架構概觀