Repository navigation
Conversation
Collaborator
Please update this branch against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key change
Capture synchronized administrator-rank storage instead of
ChatControllerin the history transformation, removing a retain cycle.Reason
Fixes #300.
The
self.currentRanks = dataassignment introduced in b025afb makes the history subscription retain its owning controller. Cleanup runs fromdeinit, which the cycle prevents from running.The change also synchronizes rank writes on the history queue with reads from UI actions.
Screenshot/video result (before/after)
No visual change is intended.
A standalone reproduction using the repository’s SwiftSignalKit confirms that the original capture retains its owner until the subscription is explicitly disposed. With the fix, all owners are released across 1,000 create/update/release cycles.
All four standalone checks passed in Debug, Release, and under Thread Sanitizer, including concurrent rank reads and writes.
Confirmation
Tested on macOS 27.2, local Release build 13.1.0 (283357). The full Release build passed and the application launches successfully.
Limitations: the standalone tests model subscription ownership rather than constructing a full
ChatController. Controlled navigation/deallocation testing and manual administrator deletion-permission checks have not yet been performed.