FROM : Casey Fleser
DATE : Tue Dec 20 20:10:21 2005
I just need a quick sanity check to make sure I'm not seeing
something obvious here before I submit this to Radar. Looks to me
that NSSpeechSynthesizer isn't cleaning up after itself properly.
Just a quick and simple action to that grabs some text from an
NSTextField. I subclassed NSSpeechSynthesizer
(DebugSpeechSynthesizer) so I could NSLog from retain, release, and
dealloc. DebugSpeechSynthesizer is getting dealloc'd, but there are
huge chunks of memory that are not being reclaimed (the main culprits
seem to live in MacinTalk AudioToolbox according to ObjectAlloc).
So anyway, am I missing something here? (for the record
DebugSpeechSynthesizer does call [super dealloc]). Clicking the speak
button repeatedly in my little sample app will consume hundreds of
megabytes of memory pretty quickly.
- (IBAction) speak: (id) inSender
{
NSSpeechSynthesizer *synthesizer =
[[DebugSpeechSynthesizer alloc] initWithVoice:
[NSSpeechSynthesizer defaultVoice]];
if (synthesizer != nil) {
[synthesizer setDelegate: self];
[synthesizer startSpeakingString: [_speechText stringValue]];
}
}
- (void) speechSynthesizer: (NSSpeechSynthesizer *) inSender
didFinishSpeaking: (BOOL) inFinishedSpeaking
{
NSLog(@"NSSpeechSynthesizer %@ finished", inSender);
[inSender release];
}
The demonstration app can be grabbed here if you like:
http://www.somegeekintn.com/download/SpeechTest.zip
Thanks for any insight,
Casey
DATE : Tue Dec 20 20:10:21 2005
I just need a quick sanity check to make sure I'm not seeing
something obvious here before I submit this to Radar. Looks to me
that NSSpeechSynthesizer isn't cleaning up after itself properly.
Just a quick and simple action to that grabs some text from an
NSTextField. I subclassed NSSpeechSynthesizer
(DebugSpeechSynthesizer) so I could NSLog from retain, release, and
dealloc. DebugSpeechSynthesizer is getting dealloc'd, but there are
huge chunks of memory that are not being reclaimed (the main culprits
seem to live in MacinTalk AudioToolbox according to ObjectAlloc).
So anyway, am I missing something here? (for the record
DebugSpeechSynthesizer does call [super dealloc]). Clicking the speak
button repeatedly in my little sample app will consume hundreds of
megabytes of memory pretty quickly.
- (IBAction) speak: (id) inSender
{
NSSpeechSynthesizer *synthesizer =
[[DebugSpeechSynthesizer alloc] initWithVoice:
[NSSpeechSynthesizer defaultVoice]];
if (synthesizer != nil) {
[synthesizer setDelegate: self];
[synthesizer startSpeakingString: [_speechText stringValue]];
}
}
- (void) speechSynthesizer: (NSSpeechSynthesizer *) inSender
didFinishSpeaking: (BOOL) inFinishedSpeaking
{
NSLog(@"NSSpeechSynthesizer %@ finished", inSender);
[inSender release];
}
The demonstration app can be grabbed here if you like:
http://www.somegeekintn.com/download/SpeechTest.zip
Thanks for any insight,
Casey
| Related mails | Author | Date |
|---|---|---|
| Casey Fleser | Dec 20, 20:10 | |
| Vince DeMarco | Dec 20, 20:13 | |
| Casey Fleser | Dec 20, 20:39 | |
| Ricky Sharp | Dec 20, 23:36 | |
| Vince DeMarco | Dec 21, 00:27 | |
| Casey Fleser | Dec 21, 16:17 |






Cocoa mail archive

