Reputation: 11880
I'm writing iOS Objective-C code sans ARC. I prefer
__weak MyClass *myWeakIVar;
to, e.g.
MyClass *myWeakIvar; // weak
Not only does it read better to me, but if I ever use this code on a garbage-collected platform, etc., I get the benefits of the __weak directive. Are there any downsides to this? Put another way, is it presently equivalent (again, w/o ARC) to a noop on iOS?
Upvotes: 2
Views: 3436
Reputation: 7422
According to this thread, __weak
does nothing on iOS if ARC is disabled.
Upvotes: 7