I am confused with the memory management issue in iPhone. I do not know which variable need to release?
I guess you need to release variables only which you assign using alloc.
// string1 will be released automatically
NSString* string1 = [NSString string];
// must release this when done
NSString* string2 = [[NSString alloc] init];
Hope it helps,