Instruments reporting memory leak whenever AVSpeechSynthesizer is used to read text

送分小仙女□ 提交于 2019-12-23 19:29:48

问题


Everytime I use AVSpeechSynthesizer to speak text Instruments reports a memory leak in the AXSpeechImplementation library. Here's the code I'm using to make the call:

AVSpeechUtterance *speak = [AVSpeechUtterance speechUtteranceWithString:text];
speak.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"];
speak.rate = AVSpeechUtteranceMaximumSpeechRate * .2;
[m_speechSynth speakUtterance:speak];

Here's the link to the Instruments screenshot http://imageshack.com/a/img690/7993/b9w5.png


回答1:


For what it is worth - yes, I see exactly the same 16byte leak on every utterance from the speech synthesizer. So either it is a leak in Apple's code or we are both making the same error somewhere!

Ali



来源:https://stackoverflow.com/questions/19991494/instruments-reporting-memory-leak-whenever-avspeechsynthesizer-is-used-to-read-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!