2012-01-31 53 views
-1

堆栈:(0xb1771f 0xb4f602 0x58e62 0x90ec4a24 0x90eb6cf2 0x90eb6781 0x90eb65c6)
2012-01-31 19:58:10.920 FINS [7353:560F] * _NSAutoreleaseNoPool():对象0x708e000类NSConcreteData自动释放与地方没有游泳池 - 刚刚泄露加载图像得到这个问题

//图像代码上的tableView背景

dispatch_queue_t concurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); 
//this will start the image loading in bg 
dispatch_async(concurrentQueue, ^{    
    NSData *image = [[[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:NewsImagestring]] autorelease]; 
    //this will set the image when loading is finished 
    dispatch_async(dispatch_get_main_queue(), ^{         
     imgView.image = [UIImage imageWithData:image];    
     [image release]; 
     [imgView release];    
    });      
}); 
+2

你为什么要发布imgView?对我来说完全是无稽之谈。 – 2012-01-31 14:34:52

+1

ARC还是ARC? – 2012-01-31 14:38:38

+1

如果你是低调,你可以评论你为什么这样做的原因。我猜在这种情况下,因为“它不会被看作是一个问题”,否则我们如何期望海报“学习”? – Damo 2012-01-31 14:38:49

回答

0

呦你正在释放自动释放池中的图像。所以这是崩溃你的应用程序。再次评论此行。