When I have such code:
Fruit *fruit= [[Fruit alloc] init];
// This is effectively two different things right, one is "fruit" - the pointer, and another thing is the object it is pointing to (the one that was allocated using alloc/init) - though not directly visible
When I add this to NSArray
:
[myArray addObject: fruit];
What gets added to the array is actually a pointer to the Fruit class object, right?