概述
原文中先定义一个 Pokemon 类
class Pokemon: CustomDebugStringConvertible {
let name: String
init(name: String) {
self.name = name
}
var debugDescription: String { return "\(name)>" }
deinit { print("\(self) escaped!") }
}
...大约 4 分钟
原文中先定义一个 Pokemon 类
class Pokemon: CustomDebugStringConvertible {
let name: String
init(name: String) {
self.name = name
}
var debugDescription: String { return "\(name)>" }
deinit { print("\(self) escaped!") }
}