Reputation: 1425
What happens if I release a non-allocated object?
Example:
NSString *value = @"hello World!";
[value release];
Upvotes: 3
Views: 133
Reputation: 28806
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.
Upvotes: 1
Reputation: 59287
Nothing, string literals are special when it comes to memory management. Check this question.
Upvotes: 2