Skip to content

Instantly share code, notes, and snippets.

@shabib87
Last active March 13, 2017 10:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save shabib87/ff237e074408961ab034d37ac50d153b to your computer and use it in GitHub Desktop.
In support to blog post
var person: Person? = Person(name: "John Doe")
var apartment: Apartment? = Apartment(number: 123)
person?.apartment = apartment
apartment?.person = person
person = nil
apartment = nil
// output:
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment