My class has an NSArray that is filled with objects. In my dealloc method, can I simply call release on my NSArray, or do I need to iterate the array and release all objects first?
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.
You can call release directly on the
NSArray. The implementation ofNSArraywill take care of sendingreleaseto all the objects stored in the array.