Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第33题,答案可能不是很准确 #15

Open
tzuyangliu opened this issue Sep 13, 2015 · 1 comment
Open

第33题,答案可能不是很准确 #15

tzuyangliu opened this issue Sep 13, 2015 · 1 comment

Comments

@tzuyangliu
Copy link

首先感谢分享~

关于“ARC通过什么方式帮助开发者管理内存”,ARC相对于MRC,不是在编译时添加retain/release/autorelease这么简单。应该是编译期和运行期两部分共同帮助开发者管理内存。

在编译期,ARC用的是更底层的C接口实现的retain/release/autorelease,这样做性能更好,也是为什么不能在ARC环境下手动retain/release/autorelease,同时对同一上下文的同一对象的成对retain/release操作进行优化(即忽略掉不必要的操作);ARC也包含运行期组件,这个地方做的优化比较复杂,但也不能被忽略。

这些内容是参考了《Effective Objective-C 2.0》书中所说,如有冒犯或疏漏还请谅解。

@ChenYilong
Copy link
Owner

非常感谢指正!我先暂时 勘误下 ,下班后会读下您说的书,还有别的其他的错误没有,我一并改下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants