This visual trace shows how closures capture self in Swift using weak and unowned references. When a closure captures self weakly, it holds an optional reference that can become nil if self is deallocated. The closure safely checks if self exists before using it, preventing crashes. When self is alive, the closure prints self's value. After self is deallocated, the closure prints a fallback message "No self" safely. In contrast, capturing self as unowned means the closure assumes self always exists. If self is deallocated before the closure runs, accessing unowned self causes a runtime crash because it points to invalid memory. This trace highlights when to use weak self (safe optional) versus unowned self (non-optional but unsafe if self is gone). Understanding these patterns helps avoid memory leaks and crashes in Swift closures.