When the code block is over, the inside of the A,b,*c pointer will be automatically reclaimed by the system compiler, because it is stored in the stack, and the OC object will not be reclaimed by the system, because it is stored in the heap, the memory inside the heap is dynamically stored, so the programmer needs to manually reclaim memory summary differences
According to the management of the stack, is automatically managed by the system compiler, do not need to manually manage the programmer for the heap, release work by the programmer manual management, not timely recovery prone to memory leaks by allocating the heap is allocated and reclaimed memory dynamically, There are two ways to allocate a stack without statically allocating: static allocation and dynamic allocation of static allocations are done by the system compiler, such as the allocation of local variables is alloc function allocation, but the dynamic allocation of the stack and the heap is different, and its dynamic distribution by the system compiler to release, No programmer manual Management required
Source: Http://www.jianshu.com/p/c8e1d91dda99
iOS about stacks, variable storage and other problems resolution