First, some programmers like to organize the code of the memory cleanup into one place in the function, while others prefer to automatically dispose of the objects at the creation point to avoid forgetting to release them later. Both of these methods are valid.
Second, the ID type represents a pointer to an object of any type, which is a generic object type. You can assign any object to a variable of type ID, or you can assign a variable of type ID to any type of object pointer. If a protocol name enclosed in angle brackets follows the ID, the compiler will know that you expect any type of object, as long as it adheres to the protocol.
Third, the concept of formal agreements, you can define a formal agreement by listing a set of method names in the @protocol section. An object can adopt this protocol by listing the name of the protocol enclosed in angle brackets after the class name in the @interface declaration. When an object takes a formal agreement, it commits to implementing every method of implementation that is listed in the protocol. If you do not implement all the methods in the protocol, the compiler will warn you to help you fulfill your commitments.
Reference: "Objective-c Basic Course"
"Reading notes" ios-memory release