private void clearClipboardContents() {
		if (isClipboardOwner) {
			isClipboardOwner = false;
			Clipboard systemClipboard = getSystemClipboard();
			systemClipboard.setContents(new DummyTransferable(), (clipboard, contents) -> {
				// dummy listener so that we can be properly garbage collected
			});
		}
	}
@see java.awt.datatransfer.ClipboardOwner#lostOwnership(java.awt.datatransfer.Clipboard,
     java.awt.datatransfer.Transferable)
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/clipboard/ClipboardPlugin.java