美文网首页
RxSwift-deallocating&deallocated

RxSwift-deallocating&deallocated

作者: Code_人生 | 来源:发表于2019-08-12 11:43 被阅读0次
    func deallocDemo(){
        _ = rx.deallocating.subscribe(onNext: { () in
            print("准备走了")
        })

        _ = rx.deallocated.subscribe(onNext: { () in
            print("已经走了")
        })
    }
    
    deinit {
        print("走了 ")
    }

准备走了
走了
已经走了

待完善

网友评论

      本文标题:RxSwift-deallocating&deallocated

      本文链接:https://www.haomeiwen.com/subject/izwyjctx.html