切换VC的时候内存溢出崩溃

 在ios8.1.2上跑APP在两个VC中相互切换,崩溃信息,引起这个崩溃的原因有可能是由于视图返回消失,但是tableview的某些动画执行时间还未结束还在对其发送信息导致的

0 libobjc.A.dylib 0x0000000197cdfbd0 objc_msgSend (scrollViewDidScroll:) + 16
1 UIKit 0x000000018aa90b9c -[UIScrollView setContentOffset:] + 500
2 UIKit 0x000000018ab46880 -[UITableView setContentOffset:] + 300
3 Foundation 0x0000000186ecd620 __NSSetPointValueAndNotify + 152
4 UIKit 0x000000018ad54634 -[UIScrollView(UIScrollViewInternal) _adjustContentOffsetIfNecessary] + 864
5 UIKit 0x000000018ab4cb64 -[UIScrollView(UIScrollViewInternal) _stopScrollingNotify:pin:tramplingDragFlags:] + 400
6 UIKit 0x000000018ab4c98c -[UIScrollView removeFromSuperview] + 44
7 UIKit 0x000000018aa71a08 -[UIView dealloc] + 440
8 libobjc.A.dylib 0x0000000197ce5724 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 564
9 CoreFoundation 0x0000000185ed8d14 _CFAutoreleasePoolPop + 24
10 CoreFoundation 0x0000000185fad5f4 ___CFRunLoopRun + 1500
11 CoreFoundation 0x0000000185ed8f74 CFRunLoopRunSpecific + 392
12 GraphicsServices 0x000000018f9336fc GSEventRunModal + 156
13 UIKit 0x000000018aadad94 UIApplicationMain + 1484
14 O2O 0x000000010014a9b8 main (main.m:14)
15 libdyld.dylib 0x0000000198376a08 _start + 4
//在dealloc中对tableview的delegate dataSource置空
- (void)dealloc
{
    self.tableView.delegate = nil;
    self.tableView.dataSource = nil;
}



你可能感兴趣的:(ios开发)