views:

244

answers:

1

Without any changes to my code except building against Qt 4.5 I get the following warning message when I run my application:

*** _NSAutoreleaseNoPool(): Object 0x50a1b0 of class NSCFNumber autoreleased with
no pool in place - just leaking

I am not using any Objective-C in my code but Qt 4.5 is using a new Cocoa based back end instead of Carbon.

I am not sure how to address and fix this error message. Anyone have a clue?

+6  A: 

Generally, when you see this problem in your code, you bracket the offending code block with NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; before and [pool release]; after. You can set a breakpoint on the _NSAutoreleaseNoPool function and just look up the stack crawl to see what the offending code is. Keep in mind that -autorelease is used everywhere in Cocoa, so it might not be a specific call to autorelease in Qt's code that's triggering it.

However, since this is Qt's code that's doing this, and, last I checked, Qt/Cocoa was still very much a work in progress, you should probably just submit a bug report with the error and a stack crawl to them, and wait for them to fix it.

Boaz Stuller