objective-cpointersnsnumbernsinteger

Why would we use a pointer in an NSInteger but not in an NSNumber?


I have an NSInteger that doesn't use a pointer and an NSNumber that does use a pointer. Can someone explain to me why this is the case? All my teacher said was the NSInteger is being used as a type alias but I'm not familiar with that either yet.

This question asked a direct question asking for the reason there was no pointer in NSInteger; not asking for all the differences.

enter image description here


Solution

  • Bear in mind that Objective-C is C. Thus: