I think I'm being a bone head here...
The static analyzer complains in the -(void)doSomethingInteresting method:
Potential leak of an object stored into myAddressBook
Well, sure, that makes sense; I'm calling a create function without a matching release. But, I don't think I want to release myAddressBook at the end of -doSomethingInteresting because I want it to stick around for the life of the AwesomeObject instance.
AwesomeObject.h
@interface AwesomeObject : NSObject
@property (assign, nonatomic) ABAddressBookRef addressBook;
@end
AwesomeObject.m
@implementation AwesomeObject
- (void)doSomethingInteresting
{
CFErrorRef error = NULL;
ABAddressBookRef myAddressBook = ABAddressBookCreateWithOptions(NULL, &error);
[self setAddressBook:myAddressBook];
}
@end
EDIT: Screen shot attached
