How Swift Implements Unowned and Weak References

Joe Groff: Unowned is faster and allows for immutability and nonoptionality. If you don’t need weak, don’t use it. unowned uses a second refcount in the object. weak refs are tracked in a global table. It’s a space/time tradeoff. unowned can’t free memory until unowned refs die, but weak frees immediately when strong refs die. … Continue reading How Swift Implements Unowned and Weak References