我使用電弧在我application.In我的申請,我在UIWebView中發揮的YouTube視頻和視頻鏈接來自數據庫,我把網址中的UITableViewCell,我得到了內存接收warning.My數據庫記錄是60 任何一個可以幫助我out.Thank你提前如何處理iPhone中的自動引用計數內存警告?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath: (NSIndexPath *)indexPath
{
NSString *CellIdentifier = [NSString stringWithFormat:@"Cell%d",indexPath.row];
VideoCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell==nil)
{
cell =[[VideoCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
cell.selectionStyle=UITableViewCellSelectionStyleNone;
[cell.lblVid_Name setText:[[arr_Video objectAtIndex:indexPath.row]valueForKey:@"Video_Name"]];
[cell.lblVid_Desc setText:[[arr_Video objectAtIndex:indexPath.row]valueForKey:@"Video_Desc"]];
NSString *url=[NSString stringWithFormat:@"%@",[[[arr_Video objectAtIndex:indexPath.row]valueForKey:@"Video_Link"]lastPathComponent]];
NSString *youTubeVideoHTML [email protected]"<html><head> <meta name = \"viewport\" content = \"initial-scale = 1.0, user-scalable = no, width = \"%f\"/></head> <body style=\"margin-top:0px;margin-left:0px\"> <iframe width= \"%f\" height=\"%f\" src = \"http://www.youtube.com/embed/%@?showinfo=0\"frameborder=\"0\" hd=\"1\" allowfullscreen/>></iframe></div></body></html>";
NSString *html = [NSString stringWithFormat:youTubeVideoHTML,cell.webView_Video.frame.size.width,cell.webView_Video.frame.size.width, cell.webView_Video.frame.size.height,url];
[cell.webView_Video loadHTMLString:html baseURL:nil];
url=nil;
youTubeVideoHTML=nil;
html=nil;
}
return cell;
}
請發表您的相關代碼。 –