private static void createSymbol(Program program, String labelname, Address address,
			String comment, boolean isEntry, boolean isPrimary, boolean anchorSymbols) {
		SymbolTable symTable = program.getSymbolTable();
		Address addr = address;
		Symbol s = symTable.getPrimarySymbol(addr);
		try {
			Namespace namespace = program.getGlobalNamespace();
			s = symTable.createLabel(addr, labelname, namespace, SourceType.IMPORTED);
			if (comment != null) {
				program.getListing().setComment(address, CommentType.EOL, comment);
			}
			if (isEntry) {
				symTable.addExternalEntryPoint(addr);
			}
			if (isPrimary) {
				s.setPrimary();
			}
			if (anchorSymbols) {
				s.setPinned(true);
			}
		}
		catch (InvalidInputException e) {
			// Nothing to do
		}
	}
Releases the given consumer from each of the provided {@link Loaded loaded programs}

@param loadedPrograms A list of {@link Loaded loaded programs} which are no longer being used
@param consumer The consumer that was marking the {@link Program}s as being used
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/AbstractProgramLoader.java