If I make an NSString using the code below, do I need to need to release someString?
NSString *someString = @'somestring';
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, it’s a compile time constant string object, so it doesn’t need releasing. It’s the moral equiv of char *c = ‘hello world’ — where the string hello world is in global data, and you’re assigning the address of this data to the pointer c.