if (listeners != null && listeners.length != nListeners) { ListenerRecord[] newKids = new ListenerRecord[length]; System.arraycopy(listeners, 0, newKids, 0, nListeners); listeners = newKids; }
  public void trimToSize()  {    if (listeners != null && listeners.length != nListeners)      {        ListenerRecord[] newKids = new ListenerRecord[length];        System.arraycopy(listeners, 0, newKids, 0, nListeners);        listeners = newKids;      }  }