Disposes of the component.
public void dispose()
A call to dispose indicates that the component is no longer needed. An implementation of dispose must do the following:
Remove any references that the component is holding to other components. This is typically accomplished by assigning null to any fields that contain references to other components.
Release any system resources that are associated with the component, such as file handles, window handles, or database connections.
Dispose of any child components, such as child windows or submenu items, by calling the dispose method of these components. (A component is a child component if its getChildOf method returns true when passed this component.)
Remove the component from its container. If the component has a site, it must execute the following:
site.getContainer().removeComponent(this);
where site is the current (non-null) site.
Trigger a dispose event for any event handlers that have been registered through the addOnDispose method.
Ideally, a call to dispose will return a component to the state it was in immediately after it was created (this is not a requirement). Following a call to dispose, a component may raise exceptions for operations that cannot meaningfully be performed.