Autorelease scope

前端 未结 4 1253
野趣味
野趣味 2021-01-12 20:32

I was wondering how the autorelese works on the iPhone. I though that once you send an autorelease to an object it is guaranteed to be retained in till the

4条回答
  •  星月不相逢
    2021-01-12 21:02

    Since you're adding your LoginViewController to the autorelease pool it's being released at the end of the run loop. When that happens it also releases its' view and removes it from being displayed.

提交回复
热议问题