Why do we use -fobjc-arc instead of removing code with #define?
Why do we use -fobjc-arc instead of removing code with #define?
- Subject: Why do we use -fobjc-arc instead of removing code with #define?
- From: Jerry Krinock <email@hidden>
- Date: Sat, 23 Jun 2012 18:37:26 -0700
I'm curious as to why, when using non-ARC code, the recommendation is to "opt out" the file with -fobjc-arc.
How about doing something like this…
#ifndef HEY_ARC_IS_IN_USE
[foo retain] ;
#endif
This way the file is fixed "once and for all", and I don't have to be setting -fobjc-arc every time I reuse this file from now until kingdom come. Certainly -fobjc-arc is also useful, but the #define seems to make much more sense for, say, my personal reusable class and class extension files which tend to be quite short. They contain only a few -retain, -release, etc.
Does Apple even provide the required HEY_ARC_IS_IN_USE definition? I can't find any such thing.
Jerry Krinock
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden