Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 3350)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 3351)
@@ -30,4 +30,5 @@
 
 public class ExtendedDialog extends JDialog {
+    private final boolean disposeOnClose;
     private int result = 0;
     public static final int DialogClosedOtherwise = 0;
@@ -85,7 +86,5 @@
      */
     public ExtendedDialog(Component parent, String title, String[] buttonTexts) {
-        super(JOptionPane.getFrameForComponent(parent), title, true);
-        this.parent = parent;
-        bTexts = buttonTexts;
+        this(parent, title, buttonTexts, true, true);
     }
 
@@ -95,7 +94,16 @@
     public ExtendedDialog(Component parent, String title, String[] buttonTexts,
             boolean modal) {
+        this(parent, title, buttonTexts, modal, true);
+    }
+
+    public ExtendedDialog(Component parent, String title, String[] buttonTexts,
+            boolean modal, boolean disposeOnClose) {
         super(JOptionPane.getFrameForComponent(parent), title, modal);
         this.parent = parent;
         bTexts = buttonTexts;
+        if (disposeOnClose) {
+            setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+        }
+        this.disposeOnClose = disposeOnClose;
     }
 
@@ -342,4 +350,8 @@
         }
         super.setVisible(visible);
+
+        if (!visible && disposeOnClose) {
+            dispose();
+        }
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java	(revision 3350)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java	(revision 3351)
@@ -119,4 +119,5 @@
                 "",
                 new String[] { tr("Apply Changes"), tr("Cancel")},
+                false,
                 false
         );
Index: trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java	(revision 3350)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java	(revision 3351)
@@ -29,5 +29,4 @@
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
@@ -35,5 +34,5 @@
 import javax.swing.DefaultComboBoxModel;
 
-import org.openstreetmap.josm.gui.tagging.ac.*;
+import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionListItem;
 
 public class ComboBoxHistory extends DefaultComboBoxModel implements Iterable<AutoCompletionListItem> {
