Created
March 13, 2017 10:23
-
-
Save shabib87/a42a1c09c99ea891b240e37ebfeef5f4 to your computer and use it in GitHub Desktop.
In support to blog post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
... | |
} | |
class Apartment { | |
... | |
weak var person: Person? | |
... | |
} | |
var person: Person? = Person(name: "John Doe") | |
var apartment: Apartment? = Apartment(number: 123) | |
apartment.person = person | |
person = nil | |
// output: | |
// John Doe is being deinitialized | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment