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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to