@Override
	protected void close() {

		synchronized (transactionMgr) {
			transactionMgr.close(this);
			closed = true;
		}

		DomainObjectAdapterDB userData = getUserData();
		if (canSave() && userData != null && userData.isChanged() &&
			(getDomainFile() instanceof GhidraFile)) {
			// Only save user data if this domain object was open for update and the
			// user data was modified.
			try {
				userData.prepareToSave();
				userData.save(null, TaskMonitor.DUMMY);
			}
			catch (CancelledException e) {
				// ignore
			}
			catch (IOException e) {
				Msg.warn(this, "Failed to save user data for: " + getDomainFile().getName());
			}
		}

		super.close();
		dbh.close(fatalErrorOccurred);

		if (userData != null) {
			userData.close();
		}
	}
This method is called before a save, saveAs, or saveToPackedFile
to update common meta data
@throws IOException
Ghidra/Framework/Project/src/main/java/ghidra/framework/data/DomainObjectAdapterDB.java