Build and Analyze tool Cocoa Xcode
I tried Build and Analyze tool of Xcode very first time today. and found some thing in this function
Please check the image:
-(IBAction)completeSe开发者_StackOverflow中文版ssionButAct:(id)sender{
NSDictionary *tempDic = [[NSDictionary alloc] initWithObjectsAndKeys:[self view],@"mainview",
congratulationScreen,@"screen",
congScreenLabel,@"cong_screen_label",
congScrStatusLabel,@"cong_scr_status_label",
[sender superview],@"last_screen",nil];
[functionality completeSession:tempDic];
}
this function start from line 64 and end at 71
Can Any one explain me the memory leakage in this function.
The text as displayed in the image seems pretty clear to me: You are creating an object that you own (new, alloc, copy, retain [NARC] does that); but you never rescind ownership.
Try using +[NSDictionary dictionaryWithObjectsAndKeys:]
instead.
精彩评论