why use the "autorelesspool" to define a macro, and what advantages do using this method have?
thanks for all you
why use the "autorelesspool" to define a macro, and what advantages do using this method have?
thanks for all you
1 回答865 阅读
2 回答662 阅读
2 回答673 阅读
1 回答654 阅读
1 回答733 阅读
663 阅读
这样定义一个宏是为了使用的时候可以加上一个@符号,因为autoreleaasepool的用法是这样的:
所以在定义宏的时候使用这个trick可以让你在使用宏的时候这样来用
至于宏定义引入的多余的
@autoreleasepool {}
和@try {} @finally {}
这种代码由于什么都没有做会被编译器给优化掉,所以并不会对最后生成的代码有影响。