*Why are all objects in Objective-C allocated in the heap instead of on the stack?
How about if we program with both Objective-C and C++?
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 isn’t clear what you are asking.
If you are asking about things like
NSString* str = @"hello";, then that was answered in the question you linked to.Why there is no heap? doesn’t make sense. There very much is a heap in iOS applications and objects are allocated from it.
The mention of “automatic objects” and/or
auto_ptrfrom the “post” you mention is entirely unrelated to Objective-C.Clarify your question, please.