ios - deinit in Swift behavior -


i wrote following code in swift playground :

class view : uiview {     let name = "myview"     deinit {         print("deinit view")     } }  class controller: nsobject {     var view: view      init(view : view) {         self.view = view         super.init()     }      deinit {         print("deinit controller")     } }  var c : controller? = controller(view: view()) c = nil 

the console shows :

deinit controller 

my question shouldn't below ?

deinit controller deinit view 


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -