CustomTaskPane.Dispose Method (2007 System)
Releases all resources used by the CustomTaskPane.
Namespace: Microsoft.Office.Tools
Assembly: Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)
Syntax
'Declaration
Public Sub Dispose
'Usage
Dim instance As CustomTaskPane
instance.Dispose()
public void Dispose()
public:
virtual void Dispose() sealed
public final function Dispose()
Implements
Remarks
Call Dispose when you are finished using the CustomTaskPane. The Dispose method leaves the CustomTaskPane in an unusable state. After calling Dispose, you must release all references to the CustomTaskPane so the garbage collector can reclaim the memory that the CustomTaskPane was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.
Typically, you should not call the Dispose method directly in your code. Instead, when you are finished using the CustomTaskPane, call the Remove or RemoveAt method to remove it from the CustomTaskPaneCollection in your add-in. These methods call the Dispose method of the CustomTaskPane that you are removing.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.