Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When ARC working? Compilation or runtime? [duplicate]

In Objective-C or Swift when ARC (Automatic Reference Counting) is working? On compilation or on run time stage? And why is it matter?

like image 868
Aleksei Danilov Avatar asked Nov 28 '22 22:11

Aleksei Danilov


1 Answers

The compiler inserts the necessary retain/release calls at compile time, but those calls are executed at runtime, just like any other code.

like image 187
Alexander Avatar answered Dec 06 '22 02:12

Alexander