Share via


OfficeRibbon.Dispose Method (2007 System)

Include Protected Members
Include Inherited Members

Releases the resources used by the OfficeRibbon class.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

 

Name

Description

Public method

Dispose()

Releases all resources used by the Component. (Inherited from Component.)

Protected method

Dispose(Boolean)

Releases the unmanaged resources used by the OfficeRibbon class and optionally releases the managed resources. (Overrides Component.Dispose(Boolean).)

Top

Remarks

Call Dispose when you are finished using the OfficeRibbon. The Dispose method leaves the OfficeRibbon in an unusable state. After calling Dispose, you must release all references to the OfficeRibbon so the garbage collector can reclaim the memory that the OfficeRibbon was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Note

Always call Dispose before you release your last reference to the OfficeRibbon. Otherwise, the resources it is using will not be freed until the garbage collector calls the OfficeRibbon object's Finalize method.

See Also

Reference

OfficeRibbon Class

OfficeRibbon Members

Microsoft.Office.Tools.Ribbon Namespace