@Override
	public List<Symbol> getSymbols(String name, Namespace namespace) {
		if (namespace == null) {
			namespace = namespaceMgr.getGlobalNamespace();
		}

		List<Symbol> list = new ArrayList<>();
		if (isDeletedNamespace(namespace)) {
			return list;
		}
		checkValidNamespaceArgument(namespace);

		// if name is possible default parameter or local variable name, must do brute force search
		if (namespace instanceof Function &&
			SymbolUtilities.isPossibleDefaultLocalOrParamName(name)) {
			return searchNamespaceForSymbols(name, namespace);
		}

		// if the name is a possible default external name, do brute force search
		if (namespace.isExternal() && SymbolUtilities.isPossibleDefaultExternalName(name)) {
			return searchNamespaceForSymbols(name, namespace);
		}

		lock.acquire();
		try {
			RecordIterator it = adapter.getSymbolsByNameAndNamespace(name, namespace.getID());
			while (it.hasNext()) {
				list.add(getSymbol(it.next()));
			}
		}
		catch (IOException e) {
			program.dbError(e);
		}
		finally {
			lock.release();
		}

		// also check if the given name could be a default symbol
		Symbol symbol = getSymbolForDynamicName(name);
		if (symbol != null && symbol.getParentNamespace().equals(namespace)) {
			list.add(symbol);
		}

		return list;
	}
Removes the symbol directly

@param sym the symbol to remove.
@return true if the symbol was removed, false otherwise.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/SymbolManager.java