-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I was testing on iOS 17.0 before and everything was working fine.
I'm using @StateViewModel. If there's anything more I can provide please let me know.
Edit: My code works fine on 17.2 and doesn't work on 17.4. But I couldn't reproduce it on the sample app. Looks like it's a bug on my code. It might be related to koin but I'm not sure.
Do you have any idea @rickclephas
Edit: It's not related to koin either. I've copied your TimeTravelViewModel and inited it just like you did
struct ChatScreen: View {
@StateViewModel var timeViewModel = TimeTravelViewModel()
let printer = DeallocPrinter()
}
class DeallocPrinter {
deinit {
print("ChatScreen deallocated")
}
}
Even if the ChatScreen is deallocated, timeViewModel is not deallocated and not cleared.
Metadata
Metadata
Assignees
Labels
No labels