Untitled

mail@pastecode.io avatar
unknown
swift
2 months ago
215 B
1
Indexable
Never
class Foo {
    var callbacks: [() -> Void] = []

    init() {
        callbacks.append(bar)
        print("foo: inited")
    }

    deinit {
        print("foo: deinit")
    }

    func bar() { }
}

let foo = Foo()
Leave a Comment