1: retain returns a value of the ID type. In this way, you can execute a reservation call with parameters of other messages in nesting mode, increase the reserved counter value of the object, and require the object to perform some operation, for example: [[Car retain] settire: Tire atindex: 2];
2: object ownership: the object owner must be cleaned up.
2.1 An object has an object. Ownership is an entity.
2.2 an object has multiple objects. Ownership is an object.
2.3 If a function creates an object, the ownership is a function.
The above ownership is mainly used to ensure that the object is no longer in use and can receive the release information in a timely manner, thus being released.
If a function creates an object (Secondary object) and the object (primary object) is owned by the secondary object, the secondary object is retained in the primary object. Release the (Secondary object) in the function. When the primary object does not need to use the secondary object, it is released. For details, see objective-C, Chapter 2, 9th page.
Set get and setCode,