gnuspeech-contact
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnuspeech-contact] GNUSpeech Console Utility


From: Marcelo Yassunori Matuda
Subject: Re: [gnuspeech-contact] GNUSpeech Console Utility
Date: Tue, 3 Nov 2009 22:13:40 -0200

Hi John,

On Tue, Nov 3, 2009 at 9:38 PM, John Delaney <address@hidden> wrote:
> Because I am a bit of a beginner, please let me know if because of my level
> of experience this email is inappropriate.

I am a newbie in ObjC too.

> Here is my very naive implementation:
> #import "TextToSpeech.h"
>
> int main (int argc, const char * argv[]) {
>     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
>
>     // insert code here...
>     NSLog(@"Hello, World!");
>
>     TextToSpeech * textToSpeech;
>     NSLog(@"0");
>     [textToSpeech init];
>
>     NSString * stext = @"hello world text";
>
>
>     [textToSpeech speakText:stext];
>
>
>     [textToSpeech dealloc];
>     //[phoneString dealloc];
>
>     [pool drain];
>     return 0;
> }

You need to allocate the memory first:

TextToSpeech *textToSpeech = [[TextToSpeech alloc] init];

And AFAIK you should use:

[textToSpeech release];

not dealloc.

Regards,
Marcelo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]