[iOS] NSAutoreleasePool is unavailable

컴퓨터/PC 2012. 5. 27. 21:46

[iOS] NSAutoreleasePool is unavailable

코딩을 하다가 이상한 상황에 처했습니다. 분명 작년에는 그냥 했던 코드들인데, 잠시 물리엔진으로 넘어갔다 온 사이에 많은 변화가 있었나 봅니다. 총체적인 에러는 

NSAutoreleasePool is unavailable


이었습니다. 여러가지 이름을 하고 있었지만, 결국 다 

그래서 그걸 알고 싶어서 인터넷을 찾아 봅니다. 
대부분은 기초적인 개념설명만 되어 있네요. 개념을 알고 넘어가는 것도 중요합니다만, 결국 나의 친구 
stack overflow에서 답을 찾았습니다.

shadow wizard님의 질문에 대한 대답들 중 한개였습니다.

결국 ARC를 하지말라고...

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.
Jason Rogers 감사합니다.

[출처] http://stackoverflow.com/questions/6655842/nsautoreleasepool-is-unavailable


설정

트랙백

댓글