Foundation framework: NSDebug.h is not ARC-compatible

Originator:jens.ayton
Number:rdar://10329797 Date Originated:2011-10-22
Status:Duplicate/10233582 Resolved:
Product:Mac OS X SDK Product Version:10.7
Classification:Other bug Reproducible:Always
 
Summary:
Foundation/NSDebug.h cannot be included in ARC code, because it declares a category on NSAutoreleasePool. It would be helpful if this was #ifed out in ARC mode.

Steps to Reproduce:
* Create a new Foundation command line project with ARC on.
* Add #import <Foundation/NSDebug.h>.
* Build.

Expected Results:
Project should compile.

Actual Results:
Compile fails with error:
'NSAutoreleasePool' is unavailable: not available in automatic reference counting mode in /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSDebug.h

Regression:
n/a

Notes:
Easy fix: #if !__has_feature(objc_arc) around the NSAutoreleasePool (NSAutoreleasePoolDebugging) category.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!