Index: trunk/src/org/openstreetmap/josm/actions/SessionSaveAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SessionSaveAction.java	(revision 18941)
+++ trunk/src/org/openstreetmap/josm/actions/SessionSaveAction.java	(revision 18942)
@@ -156,4 +156,12 @@
      */
     public boolean saveSession(boolean saveAs, boolean forceSaveAll) throws UserCancelException {
+        try {
+            return saveSessionImpl(saveAs, forceSaveAll);
+        } finally {
+            cleanup();
+        }
+    }
+
+    private boolean saveSessionImpl(boolean saveAs, boolean forceSaveAll) throws UserCancelException {
         if (!isEnabled()) {
             return false;
@@ -369,7 +377,7 @@
 
         /**
-         * Initializes action.
+         * Initializes some action fields.
          */
-        public final void initialize() {
+        private void initialize() {
             layers = new ArrayList<>(getLayerManager().getLayers());
             exporters = new HashMap<>();
@@ -613,3 +621,9 @@
     }
 
+    protected void cleanup() {
+        layers = null;
+        exporters = null;
+        dependencies = null;
+    }
+
 }
