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