Skip to content

Commit aedc511

Browse files
Fix AboutCoordinator memory leak by overriding viewController property
1 parent 72103aa commit aedc511

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

XCoordinator-Example/Coordinators/AboutCoordinator.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ enum AboutRoute: Route {
1515
}
1616

1717
class AboutCoordinator: NavigationCoordinator<AboutRoute> {
18+
19+
// MARK: Computed properties
20+
21+
override var viewController: UIViewController! {
22+
rootViewController.viewControllers.first { $0 is AboutViewController }
23+
}
1824

1925
// MARK: Initialization
2026

0 commit comments

Comments
 (0)