TextBox.Dispose 方法 (Boolean)

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

命名空間:  Microsoft.Office.Tools.Word.Controls
組件:  Microsoft.Office.Tools.Word.v4.0.Utilities (在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)

語法

'宣告
Protected Overrides Sub Dispose ( _
    disposing As Boolean _
)
protected override void Dispose(
    bool disposing
)

參數

  • disposing
    類型:System.Boolean
    true 表示會同時釋放 Managed 和 Unmanaged 資源,false 則表示只釋放 Unmanaged 資源。

備註

This method is called by the public Dispose method and the Finalize method. Dispose() invokes the protected Dispose(Boolean) method with the disposing parameter set to true. Finalize invokes Dispose with disposing set to false.

When the disposing parameter is true, this method releases all resources held by any managed objects that this TextBox references. This method invokes the Dispose() method of each referenced object.

繼承者注意事項

Dispose can be called multiple times by other objects. When overriding Dispose(Boolean), be careful not to reference objects that have been previously disposed of in an earlier call to Dispose. For more information about how to implement Dispose(Boolean), see 實作 Dispose 方法.

For more information about Dispose and Finalize, see 清除 Unmanaged 資源.

.NET Framework 安全性

請參閱

參考

TextBox 類別

Dispose 多載

Microsoft.Office.Tools.Word.Controls 命名空間