@Override
	public synchronized void endTransaction(boolean commit) {
		if (!inTransaction) {
			return;
		}
		inTransaction = false;
		if (commit) {
			redoList.clear();

			tmpAddrs.delete(changedAddrsSinceSave);
			tmpRegAddrs.delete(changedRegAddrsSinceSave);
			tmpChangedDataTypeIds.removeAll(changedDataTypeIds);
			tmpChangedCategoryIds.removeAll(changedCategoryIds);
			tmpChangedProgramTreeIds.removeAll(changedProgramTreeIds);
			tmpChangedSymbolIds.removeAll(changedSymbolIds);
			tmpChangedSourceArchiveIds.removeAll(changedSourceArchiveIds);
			tmpChangedTagIds.removeAll(changedTagIds);

			changedAddrsSinceSave.add(tmpAddrs);
			changedRegAddrsSinceSave.add(tmpRegAddrs);
			changedDataTypeIds.addAll(tmpChangedDataTypeIds);
			changedCategoryIds.addAll(tmpChangedCategoryIds);
			changedProgramTreeIds.addAll(tmpChangedProgramTreeIds);
			changedSymbolIds.addAll(tmpChangedSymbolIds);
			changedSourceArchiveIds.addAll(tmpChangedSourceArchiveIds);
			changedTagIds.addAll(tmpChangedTagIds);
			addedDataTypeIds.addAll(tmpAddedDataTypeIds);
			addedCategoryIds.addAll(tmpAddedCategoryIds);
			addedProgramTreeIds.addAll(tmpAddedProgramTreeIds);
			addedSymbolIds.addAll(tmpAddedSymbolIds);
			addedSourceArchiveIds.addAll(tmpAddedSourceArchiveIds);
			addedTagIds.addAll(tmpAddedTagIds);

			undoList.addLast(new ChangeDiff(tmpAddrs, tmpRegAddrs, tmpChangedDataTypeIds,
				tmpChangedCategoryIds, tmpChangedProgramTreeIds, tmpChangedSymbolIds,
				tmpChangedSourceArchiveIds, tmpChangedTagIds, tmpAddedDataTypeIds,
				tmpAddedCategoryIds, tmpAddedProgramTreeIds, tmpAddedSymbolIds,
				tmpAddedSourceArchiveIds, tmpAddedTagIds));

			if (undoList.size() > numUndos) {
				undoList.removeFirst();
			}
		}

		tmpAddrs = null;
		tmpRegAddrs = null;
		tmpChangedDataTypeIds = null;
		tmpChangedCategoryIds = null;
		tmpChangedProgramTreeIds = null;
		tmpChangedSymbolIds = null;
		tmpChangedSourceArchiveIds = null;
		tmpChangedTagIds = null;
		tmpAddedDataTypeIds = null;
		tmpAddedCategoryIds = null;
		tmpAddedProgramTreeIds = null;
		tmpAddedSymbolIds = null;
		tmpAddedSourceArchiveIds = null;
		tmpAddedTagIds = null;
	}
Construct a new ProgramChangeSet.
@param addrMap the address map.
@param numUndos the number of undo change sets to track.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/ProgramDBChangeSet.java