public void dispose() { rootGN = null; currImg = null; workImg = null; renderingHints = null; usr2dev = null; if (damagedAreas != null) { damagedAreas.clear(); } damagedAreas = null; }