jakob / jakob/NSAlertBlockMethods

Shouldn't the block be copied?

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The block documentation says "You only need to make a copy when you expect the block to be used after destruction of the scope within which it was declared." That seems to be the case here. `beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:` exits, allowing the block to go out of scope, before the completion block runs.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the implementation of beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo: and compare its block lifetime with the documentation quoted in the report. Inspect the completion-block path and verify that the block remains valid after the method returns; done means the behavior is consistent with the documented lifetime.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.