How to disable ARC only in part of the file, and not in general?

Possible duplicate:
Pragma to explicitly enable ARC?

Basically, I want part of the file not to use ARC, and the rest to use it (long story ...). Besides disabling ARC for each file, is there a way to do this using pre-compiler # commands?

+5
source share
2 answers

No. excuse me.

Before the stack overflow was set to:

Pragma to explicitly enable ARC?

And the community of developers as a whole:

http://lists.cs.uiuc.edu/pipermail/llvmbugs/2012-March/022462.html

+2
source

You can do this by adding conditional blocksone for ARC and others without ARC ..

ARC as -

#ifndef __has_feature
// not LLVM Compiler
#define __has_feature(x) 0
#endif

#if __has_feature(objc_arc)
#define ARC
#endif

:

#ifdef ARC
    //do your work with ARC 
#else
    //do your work without ARC
#endif
0

All Articles