查看 ARC 在何处插入保留和释放
是否有编译器选项(或其他方式)来查看 ARC 在何处插入保留和释放?这主要是出于好奇。我可以在反汇编代码中看到它们,但有时很难通过。
Is there a compiler option (or some other way) to see where ARC is inserting retain and releases? This is mostly out of curiosity. I can see them in the disassembly code, but that's hard to wade through sometimes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不。如果编译器要提供此功能,您绝对会被保留/释放的数量淹没,因为它们中的大多数在优化阶段被删除。但编译器甚至无法做到这一点,因为 ARC 不是预处理阶段。这是汇编的一部分。因此,除了查看装配体之外,您将无法获得任何信息。
No. If the compiler were to provide this, you'd get absolutely overwhelmed by the number of retains/releases, since most of them are taken out during the optimization stage. But the compiler can't even do that, because ARC isn't a pre-processing stage. It's part of the compilation. So you're not going to be able to get anything besides looking at the assembly.
不,它没有。不过我同意,这将是一个非常巧妙的补充(尽管它不会提供很多功能)!就像你说的,如果你真的好奇的话,你可以查看反汇编代码。
No, it does not. I agree though, it would be a pretty neat addition (although it wouldn't serve many functions)! And like you said, you can look in the disassembly code if you are really curious.