Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adriatikgashi/205cffd546b9d856dd0bb220e958a927 to your computer and use it in GitHub Desktop.
Save adriatikgashi/205cffd546b9d856dd0bb220e958a927 to your computer and use it in GitHub Desktop.
class Person {
let name: String
var iphone: iPhone?
init(name: String, iphone: iPhone?) {
self.name = name
self.iphone = iphone
}
deinit {
print("Class Person is deinitialized")
}
}
class iPhone {
let name: String
let owner: Person?
init(name: String, owner: Person?) {
self.name = name
self.owner = owner
}
deinit {
print("Class iPhone is deinitialized")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment