Fix Leaks

This commit is contained in:
James Magahern
2021-03-30 15:39:24 -07:00
parent 84143edfaf
commit 6eb462aeb7
3 changed files with 11 additions and 10 deletions

View File

@@ -29,11 +29,11 @@ class TabBarViewController: UIViewController, TabBarViewDataSource, TabBarViewDe
tabBarView.delegate = self
tabBarView.reloadTabs()
tabObserver = tabController.$tabs.sink(receiveValue: { [tabBarView] (newTabs: [Tab]) in
tabObserver = tabController.$tabs.sink(receiveValue: { [unowned self] (newTabs: [Tab]) in
DispatchQueue.main.async { tabBarView.reloadTabs() }
})
activeTabIndexObserver = tabController.$activeTabIndex.sink(receiveValue: { [tabBarView] (activeIndex: Int) in
activeTabIndexObserver = tabController.$activeTabIndex.sink(receiveValue: { [unowned self] (activeIndex: Int) in
tabBarView.activateTab(atIndex: activeIndex)
})
}