From bf0aac7bc61b6a5220c0036d142d3fe69bdfb134 Mon Sep 17 00:00:00 2001 From: Dennis Guse Date: Sun, 13 Aug 2023 21:03:49 +0200 Subject: [PATCH] GPSManager: on stop() release reference to observer. --- .../dennisguse/opentracks/services/handlers/GPSManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/dennisguse/opentracks/services/handlers/GPSManager.java b/src/main/java/de/dennisguse/opentracks/services/handlers/GPSManager.java index 7f3f94b887..e15ec2f411 100644 --- a/src/main/java/de/dennisguse/opentracks/services/handlers/GPSManager.java +++ b/src/main/java/de/dennisguse/opentracks/services/handlers/GPSManager.java @@ -31,7 +31,7 @@ public class GPSManager implements SensorConnector, LocationListenerCompat, GpsS private static final String LOCATION_PROVIDER = LocationManager.GPS_PROVIDER; - private final TrackPointCreator trackPointCreator; + private TrackPointCreator trackPointCreator; private Context context; private Handler handler; @@ -71,6 +71,8 @@ public void stop(Context context) { gpsStatusManager.stop(); gpsStatusManager = null; + + trackPointCreator = null; } @Override