Changeset 17455 in josm


Ignore:
Timestamp:
2021-01-11T11:54:27+01:00 (6 days ago)
Author:
GerdP
Message:

see #17184: Memory leaks

  • don't keep ref to primitives, it isn't needed anywhere
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java

    r16950 r17455  
    5656public class InspectPrimitiveDialog extends ExtendedDialog {
    5757
    58     protected transient List<IPrimitive> primitives;
    5958    private boolean mappaintTabLoaded;
    6059    private boolean editcountTabLoaded;
     
    6867    public InspectPrimitiveDialog(final Collection<? extends IPrimitive> primitives, OsmData<?, ?, ?, ?> data) {
    6968        super(MainApplication.getMainFrame(), tr("Advanced object info"), tr("Close"));
    70         this.primitives = new ArrayList<>(primitives);
    7169        setRememberWindowGeometry(getClass().getName() + ".geometry",
    7270                WindowGeometry.centerInWindow(MainApplication.getMainFrame(), new Dimension(750, 550)));
     
    7573        final JTabbedPane tabs = new JTabbedPane();
    7674
    77         tabs.addTab(tr("data"), genericMonospacePanel(new JPanel(), buildDataText(data, this.primitives)));
     75        tabs.addTab(tr("data"), genericMonospacePanel(new JPanel(), buildDataText(data, new ArrayList<>(primitives))));
    7876
    7977        final JPanel pMapPaint = new JPanel();
Note: See TracChangeset for help on using the changeset viewer.