/** * Disposes the TabContents objects passed to this method. If the * 'currentTab' is going to be disposed, then the caller should call * aboutToBeHidden() on the currentTab and set it to null before calling * this method. Also, the caller needs to ensure that descriptorToTab map * entries corresponding to the disposed TabContents objects are also * removed. * * @param tabs * @since 3.6 */ protected void disposeTabs(Collection tabs) { for (Iterator iter = tabs.iterator(); iter.hasNext();) { TabContents tab = (TabContents) iter.next(); Composite composite = (Composite) tabToComposite.remove(tab); tab.dispose(); if (composite != null) { composite.dispose(); } } }