Skip to content

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