Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Implement conditional ARC support #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

drewish
Copy link

@drewish drewish commented Aug 14, 2012

Also contains some fixes from other forks.

Andreas Grauel and others added 3 commits August 13, 2012 16:52
@pronebird
Copy link

I would make three macro definitions for copy, release, autorelease ops and switch them to do nothing for ARC projects, instead of #if penetration all around the code. Too bad my current project still uses non-arc environment, so I don't have a chance to play with it. E.g.:

#if __has_feature(objc_arc)
    #define MK_AUTORELEASE(x) (x)
    #define MK_RELEASE(x) (x)
    #define MK_COPY(x) (x)
#else
    #define MK_AUTORELEASE(x) [x autorelease]
    #define MK_RELEASE(x) [x release]
    #define MK_COPY(x) [x copy]
#endif

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants