@Override
	public void removeVariable(Variable variable) {
		manager.lock.acquire();
		try {
			startUpdate();
			checkDeleted();
			if (thunkedFunction != null) {
				thunkedFunction.removeVariable(variable);
				return;
			}
			loadVariables();

			if (variable instanceof VariableDB) {
				Symbol s = ((VariableDB) variable).symbol;
				if (symbolMap.containsKey(s)) {
					s.delete(); // results in callback to doDeleteVariable
				}
			}
		}
		finally {
			endUpdate();
			manager.lock.release();
		}
	}
@see ghidra.program.model.listing.Function#insertParameter(int, ghidra.program.model.listing.Variable, ghidra.program.model.symbol.SourceType)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionDB.java