updateCarbon(index);
void destroyItem (TabItem item) {	int count = OS.GetControl32BitMaximum(handle);	int index = 0;	while (index < count) {		if (items [index] == item) break;		index++;	}	if (index == count) return;	// not found	/* AW	int selectionIndex = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);	*/	int selectionIndex = OS.GetControl32BitValue(handle)-1;		/* AW	if (OS.SendMessage (handle, OS.TCM_DELETEITEM, index, 0) == 0) {		error (SWT.ERROR_ITEM_NOT_REMOVED);	}	*/	OS.SetControl32BitValue(handle, count-1);		System.arraycopy (items, index + 1, items, index, --count - index);	items [count] = null;	if (count == 0) {		/* AW		if (imageList != null) {			OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, 0);			Display display = getDisplay ();			display.releaseImageList (imageList);		}		imageList = null;		*/		items = new TabItem [4];	}	if (count > 0 && index == selectionIndex) {		setSelection (Math.max (0, selectionIndex - 1));		selectionIndex = getSelectionIndex ();		if (selectionIndex != -1) {			Event event = new Event ();			event.item = items [selectionIndex];			sendEvent (SWT.Selection, event);			// the widget could be destroyed at this point		}	}}