Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix __weak keywork position mistake. #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ychang-brightcove
Copy link

Based on Apple's doc: Transitioning to ARC Release Notes, __weak is type qualifier. So, the correct position of __weak is Type * __weak weakPtr, which is weakPtr is a weak pointer points to a variable with Type, instant of __weak Type * notWeakPtr, which is notWeakPtr is a pointer points to a weak variable with Type.

Since const is type qualifier too, replacing __weak by const is a easy way to verify it. The following is the example to show the difference: Type * const constPtrand const Type * ptrToConstType.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant