When should I use deinit?

后端 未结 6 1330
谎友^
谎友^ 2020-12-08 06:55

I came across a function called deinit() while reading The Swift Programming Language guide, but I\'m still wondering why and when we need to implement it since

6条回答
  •  囚心锁ツ
    2020-12-08 07:11

    If you are creating much of operations in some object which needs to be deallocated at your pace, you can do that in deinit

提交回复
热议问题