只要使用AVSpeechSynthesizer读取文本,仪器就会报告内存泄漏 [英] Instruments reporting memory leak whenever AVSpeechSynthesizer is used to read text

查看:304
本文介绍了只要使用AVSpeechSynthesizer读取文本,仪器就会报告内存泄漏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我使用AVSpeechSynthesizer说话文书仪器报告AXSpeechImplementation库中的内存泄漏。这是我用于拨打电话的代码:

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];

以下是仪器截图的链接
http://imageshack.com/a/img690/7993/b9w5.png

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

推荐答案

对于它的价值 - 是的,我在语音合成器的每个话语中看到完全相同的16byte泄漏。所以要么是Apple的代码泄漏,要么我们都在某处犯同样的错误!

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

这篇关于只要使用AVSpeechSynthesizer读取文本,仪器就会报告内存泄漏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆