Untitled
unknown
swift
2 years ago
231 B
7
Indexable
class Foo {
var callbacks: [() -> Void] = []
init() {
callbacks.append(bar)
print("foo: inited")
}
deinit {
print("foo: deinit")
}
func bar() { }
}
if true {
let foo = Foo()
}Editor is loading...
Leave a Comment