Pointers and Memory Addresses
Before we end this discussion of pointers in Objective-C, we should point out the details of how they are actually implemented. A computer’s memory can be conceptualized as a sequential collection of storage cells. Each cell of the computer’s memory has a number, called an address, associated with it. Typically, the first address of a computer’s memory is numbered 0. On most computer systems, a cell is 1 byte.
The computer uses memory to store the instructions of your computer program and to store the values of the variables associated with a program. So if you declare a variable called count to be of type int, the system assigns locations in memory to hold the value of count while the program is executing. For example, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access