This repository has been archived by the owner on Mar 5, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support compiling with ARC under Clang using ifdefs.
- Loading branch information
Alexander Staubo
committed
Feb 5, 2013
1 parent
d5aa8ae
commit da14790
Showing
1 changed file
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
da14790
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexstaubo This commit complicates future maintenance.
I would suggest instead wrapping the code in retain/(auto)release calls and define them as no-ops for when ARC is enabled.
See XCMemoryUtils.h for an example of such macros.
Also see how that file tests for ARC: We could be building on a compiler w/o the
__has_feature
function, so we need to test for that as well.da14790
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what kind of future maintenance you are thinking of, but your project is 302 loc, not exactly a maintenance nightmare? What makes most sense in my view is to fork the code into a (frozen) legacy branch and a current one. Unless you plan on maintaining the legacy non-ARC version?