Seeing where ARC is inserting retain and releases

后端 未结 2 1852
北荒
北荒 2021-02-12 15:29

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

相关标签:
2条回答
  • 2021-02-12 15:47

    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.

    0 讨论(0)
  • 2021-02-12 15:52

    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.

    0 讨论(0)
提交回复
热议问题