@Override
	public synchronized void dispose() {
		navUpdater.dispose();

		tool.removePopupActionProvider(this);
		if (repaintMgr != null) {
			repaintMgr.dispose();
		}
		if (addAction != null) {
			addAction.dispose();
			addAction = null;
		}
		if (provider != null) {
			provider.dispose();
			provider = null;
		}
		goToService = null;

		disposeAllBookmarkers();
		markerService = null;

		if (currentProgram != null) {
			currentProgram.removeListener(domainObjectListener);
		}
		currentProgram = null;
		super.dispose();
	}
Get rid of any resources this plugin is using before the plugin is destroyed.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/bookmark/BookmarkPlugin.java