Objective-C use of pointers

objective-c, pointers

Solution

In Objective-C, all object references are pointers, so you always need the pointer operator when you declare with an Objective-C object.

For other types, the use is exactly the same as in C. Use pointers when you want to pass data structures or primitive types by reference.

Problem

When do you and when dont you need the * symbol (which is because in objective-c all variables like NSString are pointer variables)? For example when do you need to do "NSString *" instead of just "NSString"?

Original source