1 Answer
1

firstPartOfMiddah and secondPartOfMiddah, you call an NSString "stringWith" convenience method. This is equivalent to invoking alloc, init, and autorelease. Your releasing them is a mistake, as they are essentially given to autorelease to release later.

middahStr you call the convenience method, but return it. All is well. It will be released later by the autorelease pool.

Rule of thumb (I'm sure there are plenty of exceptions): If you don't alloc it, don't release it.