Skip to content

Instantly share code, notes, and snippets.

@shabib87
Last active March 13, 2017 10:17
  • 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/91bbb82fabcbcb4e805103665ae3adad to your computer and use it in GitHub Desktop.
In support to blog post
class Person {
let name: String
var apartment: Apartment?
init(name: String) {
self.name = name
}
deinit {
print("\(name) is being deinitialized")
}
}
class Apartment {
let number: Int
var person: Person?
init(number: Int) {
self.number = number
}
deinit {
print("Apartment \(number) is being deinitialized")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment