Memory Management in Swift: Understanding Strong, Weak and Unowned References

Memory Management in Swift: Understanding Strong, Weak and Unowned References

Behind all the coding that we are doing, you probably have noticed some of your variables with the reference of strong, weak or unowned when writing your codes. What do they really mean? Does it make your variable stronger by declaring all with the reference of strong? The usage of strong, weak or unowned are actually related to the memory management in Swift called Automatic Reference Counting (ARC). Let’s slow down a little and try to understand what everything means here. So, ARC actually does automatic reference counting.