Using objective-c on the iPhone, what is wrong with this code? Is it leaking memory? Why? How would I do this correctly?
NSMutableString *result = [NSMutableString stringWithFormat:@"the value is %d", i];
... then later in my code... I might need to change this to:
result = [NSMutableString stringWithFormat:@"the value is now %d", i];
I need to use stringWithFormat a 2nd time... but isn't that creating a NEW string and not correctly freeing the old one?