[It's not DLog, it was a separate thread. See edits/comments below]
XCode 4.3 I'm using the common preprocessor macro for debug logging:
#ifdef DEBUG
# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define DLog(...)
#endif
Compiles/works fine under iOS 5.0, but when I run it under iOS 4.3 I get a ton of "autoreleased with no pool in place - just leaking" errors whenever DLog is executed. Tried rebooting, no help.
Am I haunted, or is there a solution? TIA.
[edit 1]
Forgot to mention it's an ARC project. The only autorelease pool is the default in main.m:
@autoreleasepool {
int retVal = UIApplicationMain(argc, argv, nil, nil);
return retVal;
}
There's nothing special about any of my DLog use, in fact the errors trigger upon app start when I simply put
DLog(@"didFinishLaunchingWithOptions");
[edit 2]
Sorry, it's not DLog causing the issue. Here's the first line that will cause it for me:
BOOL customDates = [[defaults objectForKey:@"custom_dates"] boolValue];
Console reports:
* __NSAutoreleaseNoPool(): Object 0x15cca20 of class NSCFBoolean autoreleased with no pool in place - just leaking
I'm still confused by all these leak messages because I thought we didn't need to worry about autorelease with ARC. So what is its problem?