​Fast is just a effective and instinctive programming language for macOS, iOS, watchOS and tvO...

Page 169

Swift

let mark = 98

println(stname) println(mark) When we run the above program using playground, we get the following result: swift 98

ARC Strong Reference Cycles Class Instances class studmarks { let name: String var stud: student?

init (name: String) { println("Initializing: \(name)") self.name = name }

deinit { println("Deallocating: \(self.name)") } }

class student { let name: String var strname: studmarks?

init (name: String) { println("Initializing: \(name)") self.name = name }

deinit { println("Deallocating: \(self.name)") 157


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.