Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftweak self in closuresSingle-choice MCQ

Why does using `[weak self]` here change the printed result compared to a strong capture?

class Service { var name = "A" func run() { DispatchQueue.main.async { [weak self] in print(self?.name ?? "gone") } } }