Skip to content

[Observation] ensure event triggers on deinitialization passes as if all properties that are being observed have changed (for weak storage) #79823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 7, 2025

Conversation

phausler
Copy link
Contributor

@phausler phausler commented Mar 6, 2025

It was the case that @Observable types would participate in weak storage but not trigger change events when deallocating, that deinitialization pass would leave incorrect state in views or other systems that would track those values via withObservationTracking. This now lets that deinit post as if all tracked properties are inferring a willSet (but no didSet will occur).

…all properties that are being observed have changed (for weak storage)
@phausler phausler requested a review from a team as a code owner March 6, 2025 20:33
@phausler
Copy link
Contributor Author

@swift-ci please smoke test macOS

…r instead of testing weak value deinitialization time
@phausler
Copy link
Contributor Author

phausler commented Apr 3, 2025

@swift-ci please smoke test

@phausler
Copy link
Contributor Author

phausler commented Apr 3, 2025

@swift-ci please smoke test

@phausler
Copy link
Contributor Author

phausler commented Apr 3, 2025

@swift-ci please smoke test

@phausler
Copy link
Contributor Author

phausler commented Apr 4, 2025

@swift-ci please smoke test

@phausler
Copy link
Contributor Author

phausler commented Apr 4, 2025

@swift-ci please smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant