Swift Functional Programming(Second Edition)
上QQ阅读APP看书,第一时间看更新

Automatic Reference Counting

Swift handles memory management through Automatic Reference Counting (ARC), like Objective-C and unlike languages such as Java and C#, which utilize garbage collection. ARC is used to initialize and de-initialize the resources, thereby releasing memory allocations of the class instances when they are no longer required. ARC tracks, retains, and releases in the code instances to manage the memory resources effectively.