Skip to content

Commit

Permalink
FIX: memory leak in RouteMapViewController
Browse files Browse the repository at this point in the history
Circular reference passed to escaping closure.
  • Loading branch information
michaelkirk committed Jun 27, 2024
1 parent 8164e6f commit 8fa646c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MapboxNavigation/RouteMapViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ class RouteMapViewController: UIViewController {
self.navigationView.statusView.canChangeValue = self.routeController?.locationManager is SimulatedLocationManager
guard let destination = self.route?.legs.last?.destination else { return }

self.populateName(for: destination, populated: { self.destination = $0 })
self.populateName(for: destination, populated: { [weak self] waypoint in
self?.destination = waypoint
})
}
}

Expand Down

0 comments on commit 8fa646c

Please sign in to comment.