public synchronized void removeListener(Class c, Object listener) {
		if (array == null || array.length == 0)
			return;
		if (listener == null || c == null)
			throw new IllegalArgumentException();

		int index = 0;
		while (index < array.length) {
			if (array[index] == c && array[index + 1] == listener)
				break;
			index += 2;
		}
		if (index == array.length)
			return; // listener was not found

		Object newArray[] = new Object[array.length - 2];
		System.arraycopy(array, 0, newArray, 0, index);
		System.arraycopy(array, index + 2, newArray, index, array.length
				- index - 2);
		array = newArray;
	}