I looked at another user's code and noticed that they are called an “issue” on an NSString that they don’t own (they never called alloc / keep / copy anywhere, and that was not a property).
It looked a little weird for me, and it made me wonder if there might be any weird behavior if you call release on an object that you either don't own or whose reference count is already 0? The code below compiles / works fine without warning, so I assume there are no problems, but I was just curious.
NSString *notMyString = [NSString stringWithString:@"Not mine."];
[notMyString release];
NSString *myString = [[NSString alloc] initWithString:@"Mine."];
[myString release];
[myString release];
source
share