public synchronized <T extends java.util.EventListener> void remove(
			final Class<T> listenerClass,
			final T listener
			) {
		if (listener == null) {
			return;
		}

		int position = -1;
		for(int i = listenerList.length-1; i > 0; i -= 2) {
			if (listenerClass == listenerList[i-1] && listener.equals(listenerList[i])) {
				position = i - 1;
				break;
			}
		}
		if (position >= 0) {
			Object[] newList = new Object[listenerList.length-2];
			System.arraycopy(listenerList, 0, newList, 0, position);
			System.arraycopy(listenerList, position + 2, newList, position,
					listenerList.length - position - 2);

			listenerList = newList;
		}
	}