diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2012-01-12 07:47:54 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2012-01-12 07:47:54 +0100 |
| commit | 849dbbc7b7047273efd34d1b38d6bc9149ba3e82 (patch) | |
| tree | 9660b596e4142f76251fba76cd064ef08cda4de3 | |
| parent | 07f498f8dcafcde28ee3cef5ea14b0683bd7c25b (diff) | |
| download | cgeo-849dbbc7b7047273efd34d1b38d6bc9149ba3e82.zip cgeo-849dbbc7b7047273efd34d1b38d6bc9149ba3e82.tar.gz cgeo-849dbbc7b7047273efd34d1b38d6bc9149ba3e82.tar.bz2 | |
performance: remove caches from cache after import
This (second removal) is necessary since the fix for modified waypoints.
| -rw-r--r-- | main/src/cgeo/geocaching/files/GPXImporter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/files/GPXImporter.java b/main/src/cgeo/geocaching/files/GPXImporter.java index 9ced045..e7853f0 100644 --- a/main/src/cgeo/geocaching/files/GPXImporter.java +++ b/main/src/cgeo/geocaching/files/GPXImporter.java @@ -1,9 +1,9 @@ package cgeo.geocaching.files; import cgeo.geocaching.R; +import cgeo.geocaching.SearchResult; import cgeo.geocaching.Settings; import cgeo.geocaching.cgCache; -import cgeo.geocaching.SearchResult; import cgeo.geocaching.cgeoapplication; import cgeo.geocaching.activity.IAbstractActivity; import cgeo.geocaching.activity.Progress; @@ -153,6 +153,9 @@ public class GPXImporter { cgeoapplication.removeCacheFromCache(cache.getGeocode()); app.addCacheToSearch(search, cache); + // save memory, imported caches are typically not used immediately + cgeoapplication.removeCacheFromCache(cache.getGeocode()); + if (progressHandler.isCancelled()) { throw new CancellationException(); } |
