One, the variable, the essence represents a piece of memory that can be manipulated, she uses the way is the memory symbolic + data type
1. Save the variable with three zones:
1 "Static storage area
2 "Stack
3 "Heap
2. The variable is also based on the position of the declaration of two types of salutation:
1 "Global variables
2 "Local Variables
3. Three storage areas store that variable separately
1 Static Storage-initializes when the allocation space is compiled and exists when the program runs
Global variables, static local variables
2 "Stack
The stack holds a local variable (which is a variable that refers to a variable or editor that is responsible for automatically releasing it, for example: Int,long,double basic type, they are not dynamically created, so they are stored in the stack, have the scope of the feature)
3 "Heap
Heap management relies on the runtime environment, C uses malloc,c++ using New,o-c alloc, etc.;
Simply put, the memory accessed through the pointer (*point), need to be freed, take O-c object example: NSString of an object, dynamic method [[NSString alloc] init] When the heap will create a piece of memory, you need to manage her, that is, free () she , this is iOS memory management, they do not have the scope of the features.
Second, iOS memory management
iOS Memory Management Personal Summary