public synchronized void close(boolean keepRecoveryData) {

		closeScratchPad();

		synchronized (this) {
			if (bufferMgr == null) {
				return;
			}
			bufferMgr.dispose(keepRecoveryData);
			bufferMgr = null;
			cachedChangedState = false;
		}

		notifyDbClosed();
	}
Close the database and dispose of the underlying buffer manager.
@param keepRecoveryData true if existing recovery data should be retained or false to remove
any recovery data
Ghidra/Framework/DB/src/main/java/db/DBHandle.java