I’m not very experienced with either C++ or iOS, so I’m just curious if iOS the reference counting works basically alike in boost shared pointers and in NSObject?
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.
From what I gather here, using ARC is very similar to using
std::shared_ptr(“strong” pointers) andstd::weak_ptr(“weak” pointers).Abuse the former, and avoid the latter. Anyway, prefer
std::unique_ptrif you can.(Also, I am somewhat astonished that you had to release pointers manually when programming for iOS. In the 21st century.)