Understanding Swift Memory Management

Episode 2

What Are Strong Reference Cycles

In the previous installment of this series, you learned about Automatic Reference Counting and how it helps keep memory management in check. Remember that a class instance is deallocated if no properties, constants, or variables hold a strong reference to the class instance. I didn't explain what a strong reference is, though.

Episode 3

What Is the Difference Between Strong, Weak, and Unowned References

Automatic Reference Counting, or ARC for short, was introduced in Objective-C several years ago. It greatly simplifies memory management in Swift and Objective-C. Automatic Reference Counting usually works without you having to do anything. But there are scenarios in which ARC needs a little bit of help.