(iphone)pushViewController popViewController 保留和释放?
我想知道导航堆栈上的推送/弹出视图控制器会保留/释放视图控制器。
苹果文档中没有记录它。
我看到有人说推保留。但这有记录在案吗?或者可以相信吗?
谢谢
I wonder push/pop viewController on navigation stack would retain/release the viewcontroller.
It's not documented in apple doc.
I saw someone saying push retains. But is it documented or ok to believe that?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它肯定会在推送时保留并在弹出时释放。我想说,在这种情况下,它只是遵循获取您需要使用的对象的所有权的约定,这可能就是文档没有明确提及它的原因。
It definitely does retain on push and release on pop. I would say in this case it simply follows the convention of taking ownership of objects that you need to work with, that's probably why the documentation doesn't mention it explicitly.