简体   繁体   中英

Question about Thread + iPhone

I am having a confusion with threads.

Suppose I start a thread in a ViewController which is doing some heavy processing. If I pop the viewController while the thread is still in execution will the thread stop executing or whether it will continue its execution.

It will continue to run until it finishes or you make it stop. So you should either kill that thread at an appropriate point, or make sure that the thread doesn't access any stale objects.

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