Fix memory leak issue with PassthroughRelay#168
Merged
freak4pc merged 2 commits intoCombineCommunity:mainfrom Jan 20, 2026
Merged
Fix memory leak issue with PassthroughRelay#168freak4pc merged 2 commits intoCombineCommunity:mainfrom
freak4pc merged 2 commits intoCombineCommunity:mainfrom
Conversation
Contributor
Author
|
Hello @freak4pc |
- Test subscription release with different initialization orders - Test withLatestFrom operator scenarios - Mirrors test coverage from CurrentValueRelay (PR CombineCommunity#137) - Verifies fix for issue CombineCommunity#167
f860308 to
7dbb166
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #168 +/- ##
==========================================
+ Coverage 95.47% 97.30% +1.82%
==========================================
Files 72 73 +1
Lines 4284 4742 +458
==========================================
+ Hits 4090 4614 +524
+ Misses 194 128 -66 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Fixed a memory leak with
PassthroughRelayas described in this issue #167.It appears that
PassthroughRelayfails to release its subscriptions upon receiving completion, as similarly described in this PR #85.I've confirmed the disappearance of the retain cycle with this solution in my project, but I'm not fully proficient with Combine. So, Any comments or suggestions would be greatly appreciated.