MSDN Library

CustomTaskPane.Dispose Method

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)

public void Dispose()



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.

© 2015 Microsoft