Hello. I have swiftUI app. Everything works fine on iOS 14. But with iOS 15 have problem.
My app have NavigationView and and i open few NavigationLink one by one. After that i remove main view and open another view. App start to deinitialize all views. In iOS 14 - this looks like this
deInit MainView.ViewModel
deInit SecondView.ViewModel
deInit ThirdView.ViewModel
deInit FourthView.ViewModel
And this is normal behavior. But in iOS 15 same code give different result.
deInit MainView.ViewModel
deInit FourthView.ViewModel
init FourthView.ViewModel
deInit ThirdView.ViewModel
deInit SecondView.ViewModel
deInit FourthView.ViewModel
sequence of release is different from ios 14 and this give problem with reinit of 4th view.
How I can fix it?