imageList.dispose ();
display.releaseToolImageList (imageList);
void destroyItem (ToolItem item) {	TBBUTTONINFO info = new TBBUTTONINFO ();	info.cbSize = TBBUTTONINFO.sizeof;	info.dwMask = OS.TBIF_IMAGE | OS.TBIF_STYLE;	int index = OS.SendMessage (handle, OS.TB_GETBUTTONINFO, item.id, info);	/*	* Feature in Windows.  For some reason, a tool item that has	* the style BTNS_SEP does not return I_IMAGENONE when queried	* for an image index, despite the fact that no attempt has been	* made to assign an image to the item.  As a result, operations	* on an image list that use the wrong index cause random results.		* The fix is to ensure that the tool item is not a separator	* before using the image index.  Since separators cannot have	* an image and one is never assigned, this is not a problem.	*/	if ((info.fsStyle & OS.BTNS_SEP) == 0 && info.iImage != OS.I_IMAGENONE) {		if (imageList != null) imageList.put (info.iImage, null);		if (hotImageList != null) hotImageList.put (info.iImage, null);		if (disabledImageList != null) disabledImageList.put (info.iImage, null);	}	int result = OS.SendMessage (handle, OS.TB_DELETEBUTTON, index, 0);	items [item.id] = null;	item.id = -1;	int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);	if (count == 0) {		if (imageList != null) {			OS.SendMessage (handle, OS.TB_SETIMAGELIST, 0, 0);			imageList.dispose ();		}		if (hotImageList != null) {			OS.SendMessage (handle, OS.TB_SETHOTIMAGELIST, 0, 0);			hotImageList.dispose ();		}		if (disabledImageList != null) {			OS.SendMessage (handle, OS.TB_SETDISABLEDIMAGELIST, 0, 0);			disabledImageList.dispose ();		}		imageList = hotImageList = disabledImageList = null;		items = new ToolItem [4];	}	if ((style & SWT.VERTICAL) != 0) {		OS.SendMessage (handle, OS.TB_SETROWS, count-1, 0);	}}