Memory problem with SpeechSynthesizer?


I am running Mac OS X.9 w/ Xcode 5.

I had completed the (Chapter 5) SpeakLine program a couple days ago and yesterday finished the Chapter 6 version of it (adding voices). Today, on an unrelated matter (I think), I ran Activity Monitor (all my memory, 8GB, was being used by for some reason) and noticed that the was still running. After restarting my computer, my memory was freed up and speech synthesizer was no longer running. I didn’t run any other programs that used speech synthesizer after completing the Chapter6 SpeakLine program.

Is there a reason for this w/ regards to the SpeechSynthesizer sample program? Is there something that needs to be encoded to make sure the speech synthesizer is properly exited/ deallocated/ freed?


It might be related to something else because after a program exits, all the resources it has allocated but not freed should be released by the operating system.

Can you replicate the same problem?

Are you sure you did not leave your program running?


Yes, the problem is replicated every time the program runs and exits. Even after Xcode and all other programs have exited, the speech synthesizer daemon is still left running. I can kill the process in either Terminal or Activity Monitor, but it shouldn’t be running once the program that called it has quit.


Relax: By default, the speech synthesizer daemon always runs in the background. You are not causing it to start running by running your speech-synth app.

#5 does not run in the background all the time. Run “sudo ps -ax” in Terminal and it is not there.