I just found that there’s no LinkedList implementation in Objective-C, but I need one. So I am going to use std::list(or there’s a better alternative?).
My question is: what should I care about memory management under ARC and non-ARC?
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 should manually take care of the memory management, since std::list is a C++ container. Or you can use
NSMutableArrayand treat it like a linked list, append new elements withinsertObject:atIndex:for the last index, iterate through it with an iterator,removeLastObject, etc.