Untitled
Anonymous
swift
02/05/2024 11:18 AM
288 B
23
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