Skip to content

Commit 836a2a7

Browse files
authored
Fix object deallocation issue. (#2915)
1 parent 7d787f3 commit 836a2a7

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

Sources/MapboxNavigation/RouteMapViewController.swift

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,13 @@ class RouteMapViewController: UIViewController {
182182

183183
override func viewDidLoad() {
184184
super.viewDidLoad()
185-
186-
let navigationMapView = self.navigationMapView
187-
// TODO: Verify whether content insets should be changed on map view.
188-
view.layoutIfNeeded()
189185

190-
navigationMapView.tracksUserCourse = true
186+
self.navigationMapView.tracksUserCourse = true
191187

192-
navigationMapView.mapView.on(.styleLoaded) { _ in
193-
self.showRouteIfNeeded()
194-
navigationMapView.localizeLabels()
195-
navigationMapView.mapView.showsTraffic = false
188+
self.navigationMapView.mapView.on(.styleLoaded) { [weak self] _ in
189+
self?.showRouteIfNeeded()
190+
self?.navigationMapView.localizeLabels()
191+
self?.navigationMapView.mapView.showsTraffic = false
196192

197193
// FIXME: In case when building highlighting feature is enabled due to style changes and no info currently being stored
198194
// regarding building identification such highlighted building will disappear.

0 commit comments

Comments
 (0)