As you already know, ARC will automatically help you insert retain and release statements. The arc compiler has two parts, the front-end compiler and the optimizer respectively. 1. Front-End compilers
The front-end compiler inserts the corresponding release statement for each of the "owned" objects. If an object's ownership modifier is __strong, then it is owned. If an object is created within a method, the front-end compiler automatically inserts a release statement at the end of the method to destroy it. Objects owned by a class (instance variables/properties) are freed within the Dealloc method. In fact, you don't need to write dealloc methods or invoke the Dealloc method of the parent class, and arc will automatically help you accomplish everything. In addition, the code generated by the compiler is even better than the performance of your own release statement, because the editor can make some assumptions. In Arc, no class can overwrite the release method or call it necessary. Arc optimizes the calling process by directly using Objc_release. And for retain is the same way. ARC invokes Objc_retain to replace the reserved message. 2. Arc Optimizer
Although the front-end compiler sounds very powerful, there are sometimes several repeated calls to retain and release in the code. The Arc Optimizer is responsible for removing redundant retain and release statements, ensuring that the generated code runs faster than the manual reference count code.
In the 28th chapter you'll see more about how arc works inside.