Q:

Leaks on NSString that appendformats

I have lots of leaks on a NSString. I use appendformat to append strings to it.
Here's the code :
NSString *textedetails = [[NSMutableString alloc] init];
        if([dico objectForKey:@"alertSerie"] != nil)
            {[textedetails appendFormat:@"Numéro de Série: %@ \n",[dico objectForKey:@"alertSerie"]];}
        if([dico objectForKey:@"alertDate"] != nil)
            {[textedetails appendFormat:@"Date de mise en service: %@ \n",[dico objectForKey:@"alertDate"]];}
        if([dico objectForKey:@"alertCli"] != nil)
            {[textedetails appendFormat:@"Nom du client associé: %@ \n",[dico objectForKey:@"alertCli"]];}

...
//I put the textdetails into a UITextField and...
[textedetails release];
That code give me leaks in the first and the last line of the code above...
and the printscreen of the leaks is HERE !!! 
Many thanks to help me !!! 

A:

NSString *textedetails = [[NSMutableString alloc] init];
NSMutableString *texterecap = [[NSMutableString alloc] init];

both these are never released.
Try this
NSString *textedetails = [[[NSMutableString alloc] init] autorelease];
NSMutableString *texterecap = [[[NSMutableString alloc] init] autorelease]; 

or this
NSMutableString *textedetails = [NSMutableString string];
NSMutableString *texterecap = [NSMutableString string];

