I am not sure why Instruments is showing the following code as leaking 128 bytes on the UILabel initWithFrame line:
self.navigationItem.leftBarButtonItem = self.editButtonItem;
UILabel *tmp = [[UILabel alloc] initWithFrame:CGRectMake(25, 100, 275, 100)];
self.emptyMsg = tmp;
[tmp release];
Note that in this classes is releasing the emptyMsg property in the following:
-(void) dealloc {
[self.emptyMsg release];
[self.pathToUsersFriendsFile release];
[super dealloc];
}
At one point I wasn't using the accessor method to set emptyMsg so I expected that change to the make this leak go away. Alas, it is still showing up. Can some one point me to another cause?
Declaration of variable:
@interface FriendListViewController : UITableViewController <AddFriendDelegate> {
NSString *pathToUsersFriendsFile;
UILabel *emptyMsg;
}
@property(retain) UILabel *emptyMsg;
@end