Does Objective-C have concepts of value/reference type like C#?
objective-c
Solution
All Objective-C objects are accessed by a pointer. In that sense they are all reference types.
Some Objective-C types define object equality (the -isEqual: method) as something other than pointer equality. These types behave as value-like types. Such types include NSString and NSNumber.
Types that are not Objective-C classes can be true value types in the C# sense.
Problem
According to the search on Google, looks like it doesn't officially have value/reference type. If it doesn't have, what's the counterparts? What's it called? Is it called 'Obj-C class and non Objc-C class' or 'static type and dynamic type'? However, to me, a NSString object in obj-c 'works' like a reference type in C#. It'll lead to a compiling error "statically allocated instance of Objective-C class ..." if to define it without '*' ``` NSString * pstr = [[[NSString alloc] init] autorelease]; ``` Some native types, like NSInteger or C struct, which can be created without '*', can I say it 'works' like a value type in C#? ``` NSInteger i = 0; ```