Created
September 5, 2019 20:05
-
-
Save adriatikgashi/205cffd546b9d856dd0bb220e958a927 to your computer and use it in GitHub Desktop.
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 { | |
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