On this site I feature many different open source libraries, and with the addition of automatic reference counting to the iOS SDK getting these projects to work can be tedious.
If you are trying to use a library that is not created to work with ARC enabled projects you can turn off ARC altogether for the library files, or convert the project.
However, if you are working on a project, and wish not to use ARC you’re kind of stuck.
Fortunately John Blanco has written a set of macros that you can use with your code that will automatically make it work with both ARC and non-ARC projects.
For example you’d use the SAFE_ARC_RELEASE macro in place of your regular release statement and in ARC enabled projects the statement gets wiped out, and acts as a regular release statement in non-ARC enabled projects.
These macros aren’t terribly complex just a great idea.
You can find the macros along with a usage guide on here.
Very handy if you’ve got an open source library and want to satisfy everyone.
©2012 iPhone, iOS 5, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.
.






