substituting for __weak when not using ARC

淺唱寂寞╮ 提交于 2019-12-03 16:15:06

You should not be worried about future versions of iOS because __weak is something interpreted by the compiler while producing code for you.

Looking at your other post suggests to me that your goal is to avoid weakOperation to be retained despite reference from within the block. In your specific case, where you don't use ARC, you can replace __weak by __block to indicate that your variable should not be retained during capture.

Note that the influence of__block on retain behavior is different between ARC and manual retain counting.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!