if (index == Devices.length) {
if (count == 1) {
protected void release () {	/* Free the parsing tables */	OS.XtFree(tabPointer);	OS.XtFree(crPointer);	OS.XmParseMappingFree(tabMapping);	OS.XmParseMappingFree(crMapping);	tabPointer = crPointer = tabMapping = crMapping = 0;	/*	* Free the palette.  Note that this disposes all colors on	* the display that were allocated using the Color constructor.	*/	if (xcolors != null) {		int xScreen = OS.XDefaultScreen (xDisplay);		int xColormap = OS.XDefaultColormap (xDisplay, xScreen);		int [] pixel = new int [1];		for (int i = 0; i < xcolors.length; i++) {			XColor color = xcolors [i];			if (color != null) {				pixel [0] = color.pixel;				while (colorRefCount [i] > 0) {					OS.XFreeColors (xDisplay, xColormap, pixel, 1, 0);					--colorRefCount [i];				}			}		}	}	xcolors = null;	colorRefCount = null;		COLOR_BLACK = COLOR_DARK_RED = COLOR_DARK_GREEN = COLOR_DARK_YELLOW =	COLOR_DARK_BLUE = COLOR_DARK_MAGENTA = COLOR_DARK_CYAN = COLOR_GRAY = COLOR_DARK_GRAY = COLOR_RED =	COLOR_GREEN = COLOR_YELLOW = COLOR_BLUE = COLOR_MAGENTA = COLOR_CYAN = COLOR_WHITE = null;		/* Free the Xt error handler */	int xtContext = OS.XtDisplayToApplicationContext (xDisplay);	OS.XtAppSetErrorHandler (xtContext, xtErrorProc);	xtErrorCallback.dispose (); xtErrorCallback = null;	xtNullErrorProc = xtErrorProc = 0;		/* Free the Xt Warning handler */	OS.XtAppSetWarningHandler (xtContext, xtWarningProc);	xtWarningCallback.dispose (); xtWarningCallback = null;	xtNullWarningProc = xtWarningProc = 0;		int index = 0;	while (index < Devices.length) {		if (Devices [index] != null) break;		index++;	}	if (index == Devices.length) {		/* Free the X IO error handler */		OS.XSetIOErrorHandler (XIOErrorProc);		XIOErrorCallback.dispose (); XIOErrorCallback = null;		XNullIOErrorProc = XIOErrorProc = 0;				/* Free the X error handler */		/*		* Bug in Motif.  For some reason, when a pixmap is		* set into a button or label, despite the fact that		* the pixmap is cleared from the widget before it		* is disposed, Motif still references the pixmap		* and attempts to dispose it in XtDestroyApplicationContext().		* The fix is to avoid warnings by leaving our handler		* and settings warnings to false.		*		* NOTE: The warning callback is leaked.		*/		warnings = false;//		OS.XSetErrorHandler (XErrorProc);//		XErrorCallback.dispose (); XErrorCallback = null;//		XNullErrorProc = XErrorProc = 0;	}}