开发者

Question about Thread + iPhone

开发者 https://www.devze.com 2023-01-19 17:52 出处:网络
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 execut

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号