Seeing where ARC is inserting retain and releases

后端 未结 2 1938
北荒
北荒 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.

提交回复
热议问题