public void destroy() { endTime = System.currentTimeMillis(); if (globalSchedule != null) { globalSchedule.pause(System.currentTimeMillis()); } Iterator<CompositeElement> it = getCompositeElements().iterator(); while (it.hasNext()) { ((CompositeElement) it.next()).destroy(); } }