Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardSwiftweak vs unowned mechanicsSingle-choice MCQ

Consider this code. Assuming `Node` is a class and no other references exist, what happens at the point marked, and why?

final class Node {} var w: Node? do { let n = Node() w = n } // n's strong count -> 0, deallocated print(w as Any) // <- this point