简体   繁体   中英

Memory spike before dealloc

I'm going through my code fixing retain cycles. I just finished this on one view controller and now dealloc is getting called again (I just have a log in it to check). Watching the memory graphic though I can see a huge spike after I dismiss the controller and just before dealloc is called. Is this normal behaviour?

The spike occurs about 2 seconds after the view has dismissed and the dealloc log I print appears just after the spike peaks.

- (void)dealloc {
   NSLog(@"DEALLOC SEND");
}

在此处输入图片说明

内存高峰实际上是由我返回的视图控制器引起的,而不是被释放的视图控制器引起的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM