タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

playgoundに関するBowz13のブックマーク (1)

  • Deinit method is never called - Swift playground

    In the next code I'm trying to call the deinit method releasing all the references to the Person Class instance Mark but the deinit is never called. Why? class Person{ let name:String init(name:String){ self.name = name println("Person created") } deinit { println("Person \(name) deinit") } } var Mark:Person? = Person(name:"Mark") Mark = nil // Shouldn't the person deinit method be called here? It

    Deinit method is never called - Swift playground
    Bowz13
    Bowz13 2014/07/30
    playgroundはメモリ管理に関するテストには向いていない。Guide:Deinitialization最後の"playerOne = nil"で"deinit"が呼ばれるはずだがplayground上では正常に動作しない為、要注意。
  • 1