为什么我的iOS 7应用程序在一段时间后以100%的处理器负载运行?

vom*_*ako 4 cpu-usage ios7

我的iOS 7应用程序在开始时工作正常.如果没有用户交互,处理器负载将回到0%.

然后,经过一段时间的使用后,处理器负载突然增加到100%并保持不变.

仪器显示一个名为_pthread_tsd_cleanup(libsystem_pthread.dylib)的威胁.

我试图找到更多关于此的信息,但我仍然没有解决方案.

来自仪器的调用树:

Running Time    Self        Symbol Name
   653458.0ms   99.9%   0.0     _pthread_tsd_cleanup  0x6a712
   653458.0ms   99.9%   0.0      _pthread_wqthread
   653458.0ms   99.9%   0.0       _pthread_exit
   653458.0ms   99.9%   0.0        _pthread_tsd_cleanup
   653458.0ms   99.9%   0.0         FreeContextStack
   594802.0ms   91.0%   52562.0          PopContext
   366935.0ms   56.1%   25844.0           GetContextStack
   260166.0ms   39.8%   99324.0            GetContextStack
   160842.0ms   24.6%   160842.0                pthread_once
   41188.0ms    6.3%    41188.0            pthread_getspecific
   39737.0ms    6.0%    39737.0            pthread_once
   157048.0ms   24.0%   87958.0           PopContext
   69090.0ms   10.5%    69090.0            GetContextStack
   15386.0ms    2.3%    15386.0           DYLD-STUB$$pthread_once
   2871.0ms    0.4% 2871.0            DYLD-STUB$$pthread_getspecific
   58656.0ms    8.9%    24503.0          FreeContextStack
   34153.0ms    5.2%    34153.0           PopContext
   143.0ms    0.0%  0.0     Main Thread  0x6a6e9
   3.0ms    0.0%    0.0     _dispatch_worker_thread2  0x6ac4e
   2.0ms    0.0%    0.0     _dispatch_worker_thread2  0x6b020
   1.0ms    0.0%    0.0     _pthread_tsd_cleanup  0x6ae2a
   1.0ms    0.0%    0.0     _dispatch_worker_thread2  0x6b2b9
   1.0ms    0.0%    0.0     _dispatch_mgr_thread  0x6a710
   1.0ms    0.0%    0.0     start_wqthread  0x6af42
   1.0ms    0.0%    0.0     _dispatch_worker_thread2  0x6b195
   1.0ms    0.0%    0.0     _dispatch_worker_thread2  0x6b0c1
Run Code Online (Sandbox Code Playgroud)

tyl*_*ner 10

我有相同的症状,因为并非所有的UIGraphicsBeginImageContextWithOptions(...)呼叫都有相应的呼叫UIGraphicsEndImageContext().