Deinit never called

前端 未结 13 1848
清歌不尽
清歌不尽 2020-11-30 03:51

I\'m creating a ViewController object an pushing it to a navigation controller. When the object is being popped from the stack - it is not being release and Deinit is not be

13条回答
  •  情话喂你
    2020-11-30 04:19

    add some line code of in deinit. If You put breakpoint at Empty deinit ,compiler will not stop you there put this:

    deinit {
    print("any thing")
    }
    

    It will work ;)

提交回复
热议问题