Ignore:
Timestamp:
2021-05-01T21:50:00+02:00 (3 years ago)
Author:
simon04
Message:

fix #20793 - Reduce memory consumption for GpxExtensionCollection (patch by Bjoeni, modified)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/WithAttributes.java

    r15496 r17846  
    2525     * The "exts" collection contains all extensions.
    2626     */
    27     private final GpxExtensionCollection exts = new GpxExtensionCollection(this);
     27    private GpxExtensionCollection exts;
    2828
    2929    /**
     
    8787
    8888    @Override
     89    public boolean hasExtensions() {
     90        return exts != null;
     91    }
     92
     93    @Override
    8994    public GpxExtensionCollection getExtensions() {
     95        if (exts == null) {
     96            exts = new GpxExtensionCollection(this);
     97        }
    9098        return exts;
    9199    }
Note: See TracChangeset for help on using the changeset viewer.