User Tools

Site Tools


ios-labs-s14:basics-objects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
ios-labs-s14:basics-objects [2014/02/26 12:58]
mbarboi
ios-labs-s14:basics-objects [2014/02/26 12:59]
mbarboi
Line 55: Line 55:
 NSString * title; ​ NSString * title; ​
 NSString *title; NSString *title;
-The * symbol is actually an operator that is used to de-reference a pointer. ​Pointers are pretty much what they sound like. They “point” to a location in memory where the actual data is stored. That location in memory is the true container that holds the data.+Pointers are pretty much what they sound like-- they “point” to a location in memory where the actual data is stored. That location in memory is the true container that holds the data.
  
 Pointers are a part of regular C and are used because they are more efficient. When we use pointers in our programs, we only need to store and copy a simple pointer, which is really just an address for a space in memory. It’s a relatively small piece of data. If we instead had to store and copy the data being pointed to, we might very quickly run into problems of not having enough memory. Pointers are a part of regular C and are used because they are more efficient. When we use pointers in our programs, we only need to store and copy a simple pointer, which is really just an address for a space in memory. It’s a relatively small piece of data. If we instead had to store and copy the data being pointed to, we might very quickly run into problems of not having enough memory.
ios-labs-s14/basics-objects.txt · Last modified: 2014/02/26 13:05 by mbarboi