Ignore:
Timestamp:
2020-10-11T14:24:00+02:00 (4 years ago)
Author:
GerdP
Message:

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

  • use ChangeNodesCommand instead of ChangeCommand
  • use ChangePropertyCommand instead of ChangeCommand
  • remove unused parameter

Just a small step forward...

File:
1 edited

Legend:

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

    r17141 r17163  
    2828import org.openstreetmap.josm.command.ChangeCommand;
    2929import org.openstreetmap.josm.command.ChangeNodesCommand;
     30import org.openstreetmap.josm.command.ChangePropertyCommand;
    3031import org.openstreetmap.josm.command.Command;
    3132import org.openstreetmap.josm.command.DeleteCommand;
     
    17191720    private void stripTags(Collection<Way> ways) {
    17201721        for (Way w : ways) {
    1721             final Way wayWithoutTags = new Way(w);
    1722             wayWithoutTags.removeAll();
    1723             cmds.add(new ChangeCommand(w, wayWithoutTags));
     1722            cmds.add(new ChangePropertyCommand(Collections.singleton(w), Collections.emptyMap()));
    17241723        }
    17251724        /* I18N: current action printed in status display */
Note: See TracChangeset for help on using the changeset viewer.