for(NSDictionary *feed in Feeds)
{
NSString *feedName=[feed objectForKey:@"name"];
if(listofBusiness==nil)
{
listofBusiness=[[NSMutableArray alloc]init];
}
if([listofBusiness indexOfObject:feedName] !=NSNotFound)
{
[listofBusiness addObject:feedName];
[feedName release];
feedName=nil;
}
}
在此代碼
當編譯器都對這一說法這段代碼有什麼錯誤?
如果([listofBusiness indexOfObject:feedName]!= NSNotFound)
則不能進入codition走在遞增for循環以便任何元素不會添加到數組中。此代碼中的錯誤是什麼?
無關你的問題具有很好的答案,在代碼中的內存管理是全亂了。運行靜態分析器。 – 2011-08-24 11:56:08