If method1 has the following line of code, does method1 then own the object (and therefore need to release it)?
If the above code is legal, why would anyone use either of these two alternatives?
or
Thanks
Code:
NSString *EOL = @"\n";
If the above code is legal, why would anyone use either of these two alternatives?
Code:
NSString *EOL;
EOL = [[NSString alloc] init];
EOL = @"\n";
or
Code:
NSString *EOL;
EOL = [NSString stringWithString:@"\n"];
Thanks