NSThread with _NSAutoreleaseNoPool error

前端 未结 5 779
独厮守ぢ
独厮守ぢ 2021-02-04 09:38

I have an method which save files to the internet, it works but just slow. Then I\'d like to make the user interface more smooth, so I create an NSThread to handle the slow task

5条回答
  •  忘掉有多难
    2021-02-04 10:16

    Within the thread, you need to create a new autorelease pool before you do anything else, otherwise the network operations will have issues as you saw.

提交回复
热议问题