查看ARC在何处插入保留和释放 [英] Seeing where ARC is inserting retain and releases

查看:83
本文介绍了查看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.

推荐答案

否.如果编译器提供了此功能,那么保留/释放的数量绝对会让您不知所措,因为其中大多数是在优化阶段删除的.但是编译器甚至无法做到这一点,因为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.

这篇关于查看ARC在何处插入保留和释放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆