fix: resolve retain cycle in GutenbergCoverUploadProcessor#25442
Closed
amanjeetsingh150 wants to merge 1 commit intowordpress-mobile:trunkfrom
Closed
fix: resolve retain cycle in GutenbergCoverUploadProcessor#25442amanjeetsingh150 wants to merge 1 commit intowordpress-mobile:trunkfrom
amanjeetsingh150 wants to merge 1 commit intowordpress-mobile:trunkfrom
Conversation
|
kean
approved these changes
Mar 24, 2026
Contributor
kean
left a comment
There was a problem hiding this comment.
Good find, @amanjeetsingh150. Thank you!
Contributor
Author
|
Hey @kean, I see the auto merge didn't trigger is it because of the checks are stuck? Is there anything I can do from my side to unblock this. |
Contributor
|
Hold on. There is some protections in place to allow only certain builds to run. I'm going to verify it and merge locally. Thank you. |
Contributor
|
Hey, I merged the changes via #25455 (the commit attribution is in tact). Thank you. |
Contributor
Author
|
Thanks @kean appreciated! 🙌 |
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.



Summary
Report:
xctestleaks-artifacts.zip
Fixes #25441
The
lazy var coverBlockProcessorinGutenbergCoverUploadProcessorcreated aGutenbergBlockProcessorwith areplacerclosure that strongly capturedself, whileselfstrongly heldcoverBlockProcessor, forming a retain cycle that prevented deallocation after every cover block upload.Cycle:
Fix: add
[weak self]to thereplacerclosure.Verification
Detected and verified using XCTestLeaks a tool I am working to get leaks from unit tests.
Test plan
GutenbergCoverUploadProcessorTestspass withleaks=0[weak self]withguard let selfmaintains the same logic