UIKitCategoryAdditions icon indicating copy to clipboard operation
UIKitCategoryAdditions copied to clipboard

Implement conditional ARC support

Open drewish opened this issue 11 years ago • 1 comments

Also contains some fixes from other forks.

drewish avatar Aug 14 '12 03:08 drewish

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

pronebird avatar Feb 24 '13 11:02 pronebird