How does a constant declared as below in the implementation part of a class is released:
static NSString *myconst = @"some data...";
Thx for helping,
Stephane
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.
You don’t have to release it. The string literals reside in the executable’s data section, not in the dynamically allocated memory (AKA heap).
There’s no harm in accidentally calling
releasethough. I’m pretty sure the literals are wired to quietly ignore that call.