private boolean removeVariable(List<?> list, VariableDB var) {
		int cnt = list.size();
		for (int i = 0; i < cnt; i++) {
			if (var == list.get(i)) {
				list.remove(i);
				return true;
			}
		}
		return false;
	}
Remove variable instance from list.

@param list
           variable list
@param var
           variable instance
@return true if deleted
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionDB.java