ChenYilong / iOSInterviewQuestions

iOS interview questions;iOS面试题集锦(附答案)--学习qq群或 Telegram 群交流 https://github.com/ChenYilong/iOSBlog/issues/21

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

34题-36题-题目中很多对AutoreleasePool的理解都是有问题的

SepCode opened this issue · comments

非自己创建并且ARC未优化成功的或__autoreleasing修饰的非Tagged Pointer对象。我这个总结也不全面,有时间写篇文章再放出新的总结

首先36题中的描述不正确,AutoreleasePool是以AutoreleasePoolPage为结点的双向链表来实现的。

34题中描述也不严谨,__autoreleasing修饰的autorelease对象,是在创建好之后调用objc_autorelease加入到释放池,并不是出了作用域。

不过很多技术有时效性,没使用Tagged Pointer对象之前是另一个结果,没优化之前又是另一个结果。