This morning most of the time to review the contents of the study since the beginning of the school and explain yesterday's homework, yesterday's work in the realization of different Zomb scored different this function when the teacher skillfully use the value of self.speed to achieve different points, instead of assigning different tag last case The method of tag value to judge different zombies plus different scores is not usedif ([Z ISMEMBEROFCLASS:[ZOMBC class]]) method to judge different zombies plus different scores;
The afternoon was talked about memory management, the main contents are:
ARC: Automatic memory management
MRC: Manual Memory Management
Memory count Mechanism: Memory count indicates the number of times the current object is referenced, and if the number of references is 0, the object is freed from memory
Retain Memory Count +1
Release will count to memory-1
Effect of retain (strong) assign (weak) copy on the Set method:
Retain: Two things 1. Put the original release 2 new retain+1
Assign: Direct Assignment
Copy: Call copy and assign a value
The Dealloc method calls this method when the object memory count is 0 to release memory before releasing it in Arc to verify that the object has not been released
< Span class= "Apple-converted-space" > the second part of the content is the agreement:
A protocol is a method of an object to invoke a property and method of another object, the called object must satisfy a protocol declared by that object (Guize);
Lan Yi IOS Memory Management