Xcode 4.3 : autoreleased with no pool in place

Hello,

I get these messages every time I build and run my application. I didn’t find where I can fix these warnings (the app runs fine):

Thanks.

Hi,

are you using methods like detachNewThreadSelector: of NSThread or performSelectorInBackground: of NSObject?
Creating a new thread needs also to create an autorelease pool in Garbage Collection and Memory Management environment

Hello Stefan,

This is all my code do (a clipboard case converter) :

script TestAppDelegate
	property parent : class "NSObject"
    property theText : missing value
	
    on applicationDidBecomeActive_(aNotification)
        my theText's selectAll_(me)
        my theText's paste_(me)
        set tempText to current application's NSString's stringWithString_(theText's |string|())
        set tempText to tempText's uppercaseString()
        my theText's setString_(tempText)
        my theText's selectAll_(me)
        my theText's copy_(me)
  end
    
end script

So anything that creates threads, as far as I’m concern.

It should be something in the project settings, but what? I used the default ones.

check if automatic reference counting (ARC) is enabled?
For AppleScriptObjC it must be disabled

Stefan,

After a looong search (very accurate, this Xcode. maybe too much?) I found in:

Build Settings
Combined
Apple LLVM compiler 3.1 - Language
Objective-C Garbage Collection

three options :

Unsupported
Supported [-fobjc-gc]
Required [-fobjc-gc-only]

If I choose the two last ones, the warning disappear. Which one is really correct? I don’t see the link with ARC. Oh dear, I hate tampering with things which may blow to my face one day.

you can use both required or supported.
Required means the compiler considers only Garbage Collection.
Supported means you can mix Memory Management and GC.

To find the ARC settings type ARC in the search field