Ignore:
Timestamp:
2021-01-13T15:26:08+01:00 (3 years ago)
Author:
GerdP
Message:

see #17184: Memory leaks

  • clear collection rememberMovements in OrthogonalizeAction when no edit layer exits
  • clear refs to layers which may disturb GC, maybe because of the complex cyclic deps
File:
1 edited

Legend:

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

    r15476 r17458  
    1616import org.openstreetmap.josm.io.NetworkManager;
    1717import org.openstreetmap.josm.io.OnlineResource;
     18import org.openstreetmap.josm.tools.Destroyable;
    1819import org.openstreetmap.josm.tools.SubclassFilteredCollection;
    1920import org.openstreetmap.josm.tools.Utils;
     
    2526 * @since 13957 (signature)
    2627 */
    27 public abstract class AbstractRelationAction extends AbstractAction implements IPrimitiveAction {
     28public abstract class AbstractRelationAction extends AbstractAction implements IPrimitiveAction, Destroyable {
    2829    /** relation collection */
    2930    protected transient Collection<IRelation<?>> relations = Collections.<IRelation<?>>emptySet();
     
    7273        putValue("help", helpId);
    7374    }
     75
     76    @Override
     77    public void destroy() {
     78        relations = null;
     79    }
    7480}
Note: See TracChangeset for help on using the changeset viewer.