Search code examples
memory-leaksios7avfoundationavspeechsynthesizer

Instruments reporting memory leak whenever AVSpeechSynthesizer is used to read text


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


Solution

  • 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