arr = (RenderAtomListInfo []) removeDlist.toArray(false);
arr = new RenderAtomListInfo[size]; arr = (RenderAtomListInfo []) removeDlist.toArray(arr);
    void updateDlistCanvasResource(Canvas3D[] canvases)  {	int i, j;	Canvas3D cv;	int size = 0;	RenderAtomListInfo arr[];	RenderAtomListInfo ra;	// Add the newly added dlist to the sharedList	if ((size = addDlist.size()) > 0) {	    arr = (RenderAtomListInfo []) addDlist.toArray(false);	    for (i = 0; i <size; i++) {		sharedDList.add(arr[i]);		// Fix for Issue 5: add the render atom to the list of users		// of its geometry for this RenderBin		GeometryArrayRetained geo = (GeometryArrayRetained) arr[i].geometry();		geo.addDlistUser(this, arr[i]);	    }	}	// Remove the newly removed dlist from the sharedList	if ((size = removeDlist.size()) > 0) {	    arr = (RenderAtomListInfo []) removeDlist.toArray(false);	    for (i = 0; i < size; i++) {		sharedDList.remove(arr[i]);		// Fix for Issue 5: remove this render atom from the list of users		// of its geometry for this RenderBin		GeometryArrayRetained geo = (GeometryArrayRetained) arr[i].geometry();		geo.removeDlistUser(this, arr[i]);	    }	}		    	// add to the dirty list per canvas	for (j = 0; j < canvases.length; j++) {	    cv = canvases[j];	    if ((size = addDlist.size()) > 0) {		arr = (RenderAtomListInfo []) addDlist.toArray(false);		for (i = 0; i <size; i++) {		    ra = arr[i];		    GeometryArrayRetained geo = (GeometryArrayRetained) ra.geometry();		    if ((cv.ctx != 0) &&			((geo.resourceCreationMask & cv.canvasBit) == 0) || 			(geo.getDlistTimeStamp(cv.canvasBit) != 			 cv.ctxTimeStamp)) {			geo.resourceCreationMask |=  cv.canvasBit;			dirtyList.add(ra);		    }		}	    }	    if ((size = removeDlist.size()) > 0) {		arr = (RenderAtomListInfo []) removeDlist.toArray(false);		for (i = 0; i < size; i++) {		    GeometryArrayRetained geo =			(GeometryArrayRetained) arr[i].geometry();		    // add this geometry's dlist to be freed		    if (geo.isDlistUserSetEmpty(this)) {			if (cv.ctx != 0) {			    canvases[j].displayListResourceFreeList.add(geo.dlistObj);			}			geo.resourceCreationMask &= ~canvases[j].canvasBit;			// All Dlist on all canvases have been freed, then return dlistID			if (geo.resourceCreationMask == 0)			    geo.freeDlistId();		    }		}	    }	    if ((size = dirtyList.size()) > 0) {		for (i = 0; i <size; i++) {		    ra = (RenderAtomListInfo)dirtyList.get(i);		    GeometryArrayRetained geo = (GeometryArrayRetained)ra.geometry();				    if ((geo.resourceCreationMask & cv.canvasBit) != 0) {			cv.dirtyRenderAtomList.add(ra);		    }		}		cv.dirtyDisplayList = true;		dirtyList.clear();	    }	}    }