If I have a custom view controller class that I want to reuse but when used in one instance has a retained property that isn’t actually used during the view’s lifecycle, do I need to release it in dealloc?
Share
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.
It’s OK to send messages to nil, so you should just release your retain properties in dealloc no matter what. If the property hasn’t been used, it will be nil and sending release to it is effectively a no-op.