Ignore:
Timestamp:
2020-11-26T16:39:04+01:00 (3 years ago)
Author:
GerdP
Message:

see #19885: memory leak with "temporary" objects in validator and actions

  • fix memory leaks in SplitWayAction and SplitWayCommand
  • fix (not yet used) counter of modified relations
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java

    r17188 r17362  
    223223                setHighlightedWaySegments(Collections.emptyList());
    224224                DISPLAY_COUNT.decrementAndGet();
     225                if (getValue() != 1) {
     226                    newWays.forEach(w -> w.setNodes(null)); // see 19885
     227                }
    225228            }
    226229        }
     
    304307            }
    305308        });
     309        if (!splitWayCommand.isPresent()) {
     310            newWays.forEach(w -> w.setNodes(null)); // see 19885
     311        }
    306312    }
    307313
Note: See TracChangeset for help on using the changeset viewer.