@Override
	synchronized boolean removeRef(Address deleteAddr, int opIndex) throws IOException {
		ReferenceDB[] result = new ReferenceDB[1];
		int pos = 0;
		int newPos = 0;
		for (int i = 0; i < numRefs; i++) {
			newPos = decode(refData, pos, result);
			if (result[0].getOperandIndex() == opIndex) {
				Address addr = isFrom ? result[0].getToAddress() : result[0].getFromAddress();
				if (deleteAddr.equals(addr)) {
					byte[] newData = new byte[refData.length - (newPos - pos)];
					System.arraycopy(refData, 0, newData, 0, pos);
					System.arraycopy(refData, newPos, newData, pos, newData.length - pos);
					numRefs--;
					if (numRefs == 0) {
						refData = EMPTY_DATA;
						if (adapter != null) {
							adapter.removeRecord(key);
						}
						setInvalid();
					}
					else {
						refData = newData;
						if (!isFrom) {
							byte level = getRefLevel(result[0].getReferenceType());
							if (refLevel <= level) {
								// get the new highest ref level
								refLevel = findHighestRefLevel(refLevel);
							}
						}
						updateRecord();
					}
					return true;
				}
			}
			pos = newPos;
		}
		return false;
	}
Construct reference list for existing record
@param rec existing refList record
@param adapter entry record storage adapter
@param addrMap address map for encoding/decoding addresses
@param program may be null for upgrade in which 
		case resulting reference objects are not suitable for general use.
@param cache RefList object cache
@param isFrom true for from-adapter use, false for to-adapter use
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/RefListV0.java