Excellent news, the issue has been addressed in the iOS 17 beta 1 released yesterday. Thanks to everyone who made this important fix possible.
Post
Replies
Boosts
Views
Activity
As written on a related thread, the issue has been fixed in iOS 17.2 beta 1.
The issue has not been fixed in the iOS 17 RC published today. I guess there might be troubles ahead for early adopters of the new Observation API (but not only, see my previous comment) when the owning view is presented in a modal.
This issue sadly generally affects instances of reference types stored as @State, even without using the new Observation API. It can therefore be considered an iOS 17 regression since storing simple reference types as @State without @ObservableObject was possible without leaks on iOS 16 (I can also confirm that the issue does not arise with @ObservableObject conformance).
Though in general you likely want automatic observation, sometimes being able to store an instance of a non-observable reference type for the lifetime of a SwiftUI view is still useful and legitimate. This is for example how you might store an AVPlayer displaying its content in a VideoPlayer view, as show in this official code sample.
I also reported this issue as FB13126425. Sample code is available here.