NSAutoreleasePool is unavailable

前端 未结 5 1992
余生分开走
余生分开走 2020-12-05 23:13

I am following \"Programming in Objective-C\" 3rd edition and I am having problems with the first example.

I keep getting this error:

5条回答
  •  感动是毒
    2020-12-05 23:51

    Quick post just in case you still looking

    You can disable ARC in build settings.

    • Click on you project, in the left hand organizer.
    • Select your target, in the next column over.
    • Select the Build Settings tab at the top.
    • Scroll down to "Objective-C Automatic Reference Counting" (it may be listed as "CLANG_ENABLE_OBJC_ARC" under the User-Defined settings group), (if you do not find ARC option under build settings, you might need to toggle you compiler. You can find it under build settings)
    • and set it to NO.

提交回复
热议问题