__strong and __weak keyword placement - Objective-C
-
29-10-2019 - |
Question
The compiler seems to have no problem with the two following declarations:
NSObject * __weak weakThing;
__weak NSObject *anotherWeakThing;
Is there a difference between the two? Is the behavior like the const keyword?
I ask because Xcode's warning generally suggest ...
SomeDataType * __weak / __strong
... when you've goofed something up. So I've tried to follow this pattern, but wondered if there was a difference at all.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow