Advanced Memory Management in Swift (Part 1)
The Side Table, Object Lifecycle, Unowned (Safe) vs. Unowned (Unsafe) References
After a few weeks since my previous memory-management video came out, I’m having a look at advanced-level questions—because that’s where the most fun is!
This time, I’m covering the difference between unowned (safe) and unowned (unsafe) references, explaining the side table, and diving into the details of object lifecycle.
Links
- The one link to rule them all—reference counting source, with comments (explains the side table, +1s shenanigans, and object lifecycle)
- Unowned (safe) vs. unowned (unsafe)
- Weak references before Swift 4 (and side tables)
- Weak references in Swift 4 (with side tables)
- Side tables with pictures