What happens if I release a non-allocated object?
Example:
NSString *value = @"hello World!";
[value release];
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.
As sydill said, string literals are different, as they don’t need to be allocated or released.
Releasing other non-allocated objects OTOH, also NSStrings that are not literals, will very likely cause an EXC_BAD_ACCESS exception.