Understanding Swift Memory Management

Episode 2

What Are Strong Reference Cycles

07:05

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

How to Break a Strong Reference Cycle

07:33

Strong reference cycles negatively impact your application's performance. They lead to memory leaks and unexpected behavior that is often hard to debug. In this episode, I show you how to resolve the strong reference cycles we created in the previous episode of this series.

Episode 4

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

06:49

In the previous episode of Understanding Swift Memory Management, you learned how weak and unowned references can break a strong reference cycle. What sets weak and unowned references apart from strong references? What is the difference between weak and unowned references? When is it appropriate to choose an unowned reference over a weak reference? We tackle these questions in this episode.