Cocoa/highgui: replace with @autoreleasepool blocks#26660
Merged
asmorkalov merged 1 commit intoopencv:4.xfrom Jan 24, 2025
NekoAsakura:4.x
Merged
Cocoa/highgui: replace with @autoreleasepool blocks#26660asmorkalov merged 1 commit intoopencv:4.xfrom NekoAsakura:4.x
@autoreleasepool blocks#26660asmorkalov merged 1 commit intoopencv:4.xfrom
NekoAsakura:4.x
Conversation
VadimLevin
requested changes
Jan 10, 2025
Contributor
Author
|
Thank you for your time reviewing! I have made the suggested changes in the latest commit. |
Contributor
|
@VadimLevin please take a look again. |
Contributor
Author
|
Oops, some tests have failed. It seems this is due to accidental variable shadowing. I will correct it asap. |
Contributor
|
CI logs: |
…traneous comments
Contributor
Author
|
Thank you :) it should have been fixed. |
VadimLevin
approved these changes
Jan 24, 2025
Merged
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.
According to Apple Developer Documentation,
@autoreleaseblock is the preferred method over using an instance of NSAutoreleasePool directly. This is also discussed in Cocoa/highgui: fix leak in cvGetWindowRect_COCOA #26625 (comment).Starting from commit 4ec4cf6,
highgui_cocoa.mmcontained numerous debug lines that had been commented out, such as:opencv/modules/highgui/src/window_cocoa.mm
Lines 172 to 183 in dbb330d
Such extraneous comments should be removed once debugging is complete and should not remain in the release environment. A previous commit fb34f36 had partially cleaned up these comments. This PR made a thorough review and cleaned up the remaining extraneous comments.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.